From fdb165cebb2e7c9502a667721be7371430cdec67 Mon Sep 17 00:00:00 2001 From: Kirill Suvorov Date: Thu, 22 Aug 2024 13:02:13 +0000 Subject: [PATCH] use cfg context --- modin/tests/pandas/test_groupby.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/modin/tests/pandas/test_groupby.py b/modin/tests/pandas/test_groupby.py index 12c0b888ff2..36987c0d931 100644 --- a/modin/tests/pandas/test_groupby.py +++ b/modin/tests/pandas/test_groupby.py @@ -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 ( @@ -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( { @@ -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(