Skip to content

Commit

Permalink
FIX-modin-project#5925: Put a sorting-hack into groupby tests to hide m…
Browse files Browse the repository at this point in the history
…odin-project#6875 bug

Signed-off-by: Dmitry Chigarev <[email protected]>
  • Loading branch information
dchigarev committed Jan 30, 2024
1 parent 93e7aff commit 57ffaa7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modin/pandas/test/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -3230,10 +3230,6 @@ def _apply_transform(df):
def test_range_groupby_categories(
observed, func, by_cols, cat_cols, exclude_values, as_index, modify_config
):
# HACK: there's a bug in range-partitioning impl that can be triggered
# here on certain seeds, manually setting the seed so it won't show up
# https://github.com/modin-project/modin/issues/6875
np.random.seed(0)
data = {
"a": ["a", "b", "c", "d", "e", "b", "g", "a"] * 32,
"b": [1, 2, 3, 4] * 64,
Expand All @@ -3248,4 +3244,8 @@ def test_range_groupby_categories(

md_res = func(md_df.groupby(by_cols, observed=observed, as_index=as_index))
pd_res = func(pd_df.groupby(by_cols, observed=observed, as_index=as_index))
df_equals(md_res, pd_res)

# HACK, FIXME: there's a bug in range-partitioning impl that apparently can
# break the order of rows in the result for multi-column groupbys. Placing the sorting-hack for now
# https://github.com/modin-project/modin/issues/6875
df_equals(md_res.sort_index(axis=0), pd_res.sort_index(axis=0))

0 comments on commit 57ffaa7

Please sign in to comment.