Skip to content

Commit

Permalink
Add tests for FIX-modin-project#7346
Browse files Browse the repository at this point in the history
  • Loading branch information
data-makerman committed Jul 22, 2024
1 parent b5f50b9 commit a360f93
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modin/tests/core/storage_formats/pandas/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2784,3 +2784,23 @@ def dataframe_test_default_property(df):
match="<function DataFrame.<property fget:_test_default_property>> is not currently supported",
):
pd.DataFrame([[1]]).dataframe_test_default_property

def test_daemonic_worker_protection():
# Test for issue #7346, wherein some operations on Dask cause a second submission of a task to
# the Dask client from the worker scope, which should not cause a new client to be created

def submission_triggering_row_operation(row):
row_to_dict = row.to_dict()
dict_to_row = pd.Series(row_to_dict)
return dict_to_row

df = pd.DataFrame(
{
"A": ["a", "b", "c", "d"],
"B": [1, 2, 3, 4],
"C": [1, 2, 3, 4],
"D": [1, 2, 3, 4],
}
)

df = df.apply(submission_triggering_row_operation, axis=1)

0 comments on commit a360f93

Please sign in to comment.