@@ -453,7 +453,9 @@ def test_moving_pico_to_cluster_in_place_calls_set_backend_only_once_github_issu
453453
454454def test_cast_to_second_backend_with___init__ (pico_df , cluster_df ):
455455 df3 = pd .DataFrame ({"pico" : pico_df .iloc [:, 0 ], "cluster" : cluster_df .iloc [:, 0 ]})
456- assert pico_df .get_backend () == "Cluster" # pico_df was cast inplace
456+ assert (
457+ pico_df .get_backend () == "Pico"
458+ ) # pico stays despite in-place casting because of iloc
457459 assert cluster_df .get_backend () == "Cluster"
458460 assert df3 .get_backend () == "Cluster" # result should be on cluster
459461
@@ -472,7 +474,7 @@ def test_cast_to_first_backend_with_concat_uses_first_backend_api_override(
472474 lambda * args , ** kwargs : "custom_concat_result"
473475 )
474476 assert pd .concat ([cluster_df , pico_df ], axis = 1 ) == "custom_concat_result"
475- assert pico_df .get_backend () == "Cluster" # pico was cast inplace to cluster
477+ assert pico_df .get_backend () == "Cluster" # pico was cast in place
476478 assert cluster_df .get_backend () == "Cluster"
477479
478480
@@ -483,7 +485,7 @@ def test_cast_to_first_backend_with___init__(pico_df, cluster_df):
483485 "pico" : pico_df .iloc [:, 0 ],
484486 }
485487 )
486- assert pico_df .get_backend () == "Cluster " # cluster was cast in place
488+ assert pico_df .get_backend () == "Pico " # Pico not cast in place because of iloc
487489 assert cluster_df .get_backend () == "Cluster"
488490 assert df3 .get_backend () == "Cluster" # result should be on cluster
489491
@@ -1509,7 +1511,11 @@ def test_groupby_apply_switches_for_small_input(
15091511 pandas_result = operation (pandas_df )
15101512 df_equals (modin_result , pandas_result )
15111513 assert modin_result .get_backend () == expected_backend
1512- assert modin_df .get_backend () == expected_backend
1514+ if groupby_class == "DataFrameGroupBy" :
1515+ assert modin_df .get_backend () == expected_backend
1516+ # The original dataframe does not move with the SeriesGroupBy
1517+ if groupby_class == "SeriesGroupBy" :
1518+ assert modin_df .get_backend () == "Big_Data_Cloud"
15131519
15141520 def test_T_switches (self ):
15151521 # Ensure that calling df.T triggers a switch (GH#7653)
0 commit comments