Skip to content

Commit

Permalink
test_raise_on_non_string_column_name when dask-expr NOT enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Mar 7, 2024
1 parent 899ce5a commit b8fe402
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions distributed/shuffle/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ def test_raise_on_sparse_data():

def test_raise_on_non_string_column_name():
df = dd.from_pandas(pd.DataFrame({"a": range(10), 1: range(10)}), npartitions=5)
with pytest.raises(
TypeError, match="p2p requires all column names to be str"
), dask.config.set({"dataframe.shuffle.method": "p2p"}):

if dd._dask_expr_enabled():
df.shuffle("a")
else:
with pytest.raises(
TypeError, match="p2p requires all column names to be str"
), dask.config.set({"dataframe.shuffle.method": "p2p"}):
df.shuffle("a")


def test_does_not_raise_on_stringified_numeric_column_name():
Expand Down

0 comments on commit b8fe402

Please sign in to comment.