def test_set_index_self_index(shuffle_method):
    df = pd.DataFrame({'x': np.random.random(100), 'y': (np.random.random(100) // 0.2)}, index=np.random.random(100))
    a = dd.from_pandas(df, npartitions=4)
    b = a.set_index(a.index, shuffle=shuffle_method)
    assert (a is b)
    assert_eq(b, df.set_index(df.index))
def test_set_index_self_index(shuffle_method):
    df = pd.DataFrame({'x': np.random.random(100), 'y': (np.random.random(100) // 0.2)}, index=np.random.random(100))
    a = dd.from_pandas(df, npartitions=4)
    b = a.set_index(a.index, shuffle=shuffle_method)
    assert (a is b)
    assert_eq(b, df.set_index(df.index))