From 0a80678e849e6df9d8ab365990cbc30d41c0129b Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Fri, 4 Feb 2022 18:16:01 -0800 Subject: [PATCH] Only wrap --- python/cudf/cudf/tests/test_struct.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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(