File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 22
22
23
23
import modin .pandas as pd
24
24
from modin .config import (
25
- DynamicPartitioning ,
26
25
IsRayCluster ,
27
26
NPartitions ,
28
27
RangePartitioning ,
29
28
StorageFormat ,
29
+ context ,
30
30
)
31
31
from modin .core .dataframe .algebra .default2pandas .groupby import GroupBy
32
32
from modin .core .dataframe .pandas .partitioning .axis_partition import (
@@ -2438,8 +2438,6 @@ def test_multi_column_groupby_different_partitions(
2438
2438
2439
2439
2440
2440
def test_empty_partitions_after_groupby ():
2441
- DynamicPartitioning .put (True )
2442
-
2443
2441
def func_to_apply (grp ):
2444
2442
return grp .agg (
2445
2443
{
@@ -2452,15 +2450,16 @@ def func_to_apply(grp):
2452
2450
md_df , pd_df = create_test_dfs (data )
2453
2451
by = pd_df .columns [0 ]
2454
2452
2455
- md_grp , pd_grp = (
2456
- md_df .groupby (by ),
2457
- pd_df .groupby (by ),
2458
- )
2459
- eval_general (
2460
- md_grp ,
2461
- pd_grp ,
2462
- func_to_apply ,
2463
- )
2453
+ with context (DynamicPartitioning = True ):
2454
+ md_grp , pd_grp = (
2455
+ md_df .groupby (by ),
2456
+ pd_df .groupby (by ),
2457
+ )
2458
+ eval_general (
2459
+ md_grp ,
2460
+ pd_grp ,
2461
+ func_to_apply ,
2462
+ )
2464
2463
2465
2464
2466
2465
@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments