def test_shuffle_by_as_list():
    df = pd.DataFrame({'a': [1, 3, 2]})
    ddf = dd.from_pandas(df, npartitions=3)
    with dask.config.set(scheduler='single-threaded'):
        got = ddf.sort_values(by=['a'], npartitions='auto', ascending=True)
    expect = pd.DataFrame({'a': [1, 2, 3]})
    dd.assert_eq(got, expect, check_index=False)
def test_shuffle_by_as_list():
    df = pd.DataFrame({'a': [1, 3, 2]})
    ddf = dd.from_pandas(df, npartitions=3)
    with dask.config.set(scheduler='single-threaded'):
        got = ddf.sort_values(by=['a'], npartitions='auto', ascending=True)
    expect = pd.DataFrame({'a': [1, 2, 3]})
    dd.assert_eq(got, expect, check_index=False)