Skip to content

Commit

Permalink
test: allow cuDF series in compare_dicts (#1100)
Browse files Browse the repository at this point in the history
* allow cuDF series in compare_dicts

* add pragma: no cover for cuDF
  • Loading branch information
LiamConnors authored Sep 30, 2024
1 parent 0ffd2bc commit 7fb0c5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fb0c5d

Please sign in to comment.