From 7fb0c5da896b0ef05c14ad562d746efb38e7ac5a Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 30 Sep 2024 16:05:01 -0400 Subject: [PATCH] test: allow cuDF series in compare_dicts (#1100) * allow cuDF series in compare_dicts * add pragma: no cover for cuDF --- tests/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index e8b453f9d..b2030744c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -34,7 +34,12 @@ def compare_dicts(result: Any, expected: dict[str, Any]) -> None: for key in result.columns: assert key in expected for key in expected: - for lhs, rhs in zip_strict(result[key], expected[key]): + result_key = result[key] + if hasattr(result_key, "_compliant_series") and "CUDF" in str( + result_key._compliant_series._implementation + ): # pragma: no cover + result_key = result_key.to_pandas() + for lhs, rhs in zip_strict(result_key, expected[key]): if hasattr(lhs, "as_py"): lhs = lhs.as_py() # noqa: PLW2901 if hasattr(rhs, "as_py"): # pragma: no cover