diff --git a/python/cudf/cudf/tests/test_struct.py b/python/cudf/cudf/tests/test_struct.py index 32c60f27cfa..167f171fa26 100644 --- a/python/cudf/cudf/tests/test_struct.py +++ b/python/cudf/cudf/tests/test_struct.py @@ -207,13 +207,11 @@ def test_dataframe_to_struct(): # check that a non-string (but convertible to string) named column can be # converted to struct + df = cudf.DataFrame([[1, 2], [3, 4]], columns=[(1, "b"), 0]) + expect = cudf.Series([{"(1, 'b')": 1, "0": 2}, {"(1, 'b')": 3, "0": 4}]) with pytest.warns(UserWarning, match="will be casted"): - df = cudf.DataFrame([[1, 2], [3, 4]], columns=[(1, "b"), 0]) - expect = cudf.Series( - [{"(1, 'b')": 1, "0": 2}, {"(1, 'b')": 3, "0": 4}] - ) got = df.to_struct() - assert_eq(got, expect) + assert_eq(got, expect) @pytest.mark.parametrize(