Skip to content

Commit

Permalink
Sort by index in groupby tests more consistently (#7802)
Browse files Browse the repository at this point in the history
Pandas sorts the result of a groupby by its index by default, whereas we do not. For testing purposes, we currently call groupby() with `sort=True` in many of our tests. But some tests (notably newer ones) don't do that. These tests have been passing silently. [Until now](https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cudf/job/prb/job/cudf-gpu-test/1842/CUDA=10.2,GPU_LABEL=gpu,OS=centos7,PYTHON=3.8/testReport/junit/cudf.tests/test_groupby/test_series_groupby_agg_max_/).

* adds a `assert_groupby_results_equal` helper in `test_groupby.py`, which sorts its inputs by index before comparing them
* removes the manual `sort=True` we are doing in each of our groupby tests

Authors:
  - Ashwin Srinath (https://github.com/shwina)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Keith Kraus (https://github.com/kkraus14)

URL: #7802
  • Loading branch information
shwina authored Apr 1, 2021
1 parent 93050d4 commit 45cda02
Showing 1 changed file with 231 additions and 249 deletions.
Loading

0 comments on commit 45cda02

Please sign in to comment.