def test_shuffle_sort(shuffle_method):
    df = pd.DataFrame({'x': [1, 2, 3, 2, 1], 'y': [9, 8, 7, 1, 5]})
    ddf = dd.from_pandas(df, npartitions=3)
    df2 = df.set_index('x').sort_index()
    ddf2 = ddf.set_index('x', shuffle=shuffle_method)
    assert_eq(ddf2.loc[2:3], df2.loc[2:3])
def test_shuffle_sort(shuffle_method):
    df = pd.DataFrame({'x': [1, 2, 3, 2, 1], 'y': [9, 8, 7, 1, 5]})
    ddf = dd.from_pandas(df, npartitions=3)
    df2 = df.set_index('x').sort_index()
    ddf2 = ddf.set_index('x', shuffle=shuffle_method)
    assert_eq(ddf2.loc[2:3], df2.loc[2:3])