Skip to content

Commit

Permalink
use cfg context
Browse files Browse the repository at this point in the history
  • Loading branch information
Retribution98 committed Aug 22, 2024
1 parent 81d8039 commit fdb165c
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions modin/tests/pandas/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

import modin.pandas as pd
from modin.config import (
DynamicPartitioning,
IsRayCluster,
NPartitions,
RangePartitioning,
StorageFormat,
context,
)
from modin.core.dataframe.algebra.default2pandas.groupby import GroupBy
from modin.core.dataframe.pandas.partitioning.axis_partition import (
Expand Down Expand Up @@ -2438,8 +2438,6 @@ def test_multi_column_groupby_different_partitions(


def test_empty_partitions_after_groupby():
DynamicPartitioning.put(True)

def func_to_apply(grp):
return grp.agg(
{
Expand All @@ -2452,15 +2450,16 @@ def func_to_apply(grp):
md_df, pd_df = create_test_dfs(data)
by = pd_df.columns[0]

md_grp, pd_grp = (
md_df.groupby(by),
pd_df.groupby(by),
)
eval_general(
md_grp,
pd_grp,
func_to_apply,
)
with context(DynamicPartitioning=True):
md_grp, pd_grp = (
md_df.groupby(by),
pd_df.groupby(by),
)
eval_general(
md_grp,
pd_grp,
func_to_apply,
)


@pytest.mark.parametrize(
Expand Down

0 comments on commit fdb165c

Please sign in to comment.