Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: allow cuDF series in compare_dicts #1100

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading