(nelem, by, ascending)
| 187 | @pytest.mark.parametrize("by", ["a", "b", ["a", "b"]]) |
| 188 | @pytest.mark.parametrize("nelem", [10, 500]) |
| 189 | def test_sort_values_(nelem, by, ascending): |
| 190 | np.random.seed(0) |
| 191 | df = pd.DataFrame() |
| 192 | df["a"] = np.ascontiguousarray(np.arange(nelem)[::-1]) |
| 193 | df["b"] = np.arange(100, nelem + 100) |
| 194 | ddf = from_pandas(df, npartitions=10) |
| 195 | |
| 196 | # run on single-threaded scheduler for debugging purposes |
| 197 | with dask.config.set(scheduler="single-threaded"): |
| 198 | got = ddf.sort_values(by=by, ascending=ascending) |
| 199 | expect = df.sort_values(by=by, ascending=ascending) |
| 200 | assert_eq(got, expect, check_index=False, sort_results=False) |
| 201 | |
| 202 | |
| 203 | @pytest.mark.parametrize("ascending", [True, False, [False, True], [True, False]]) |
nothing calls this directly
no test coverage detected