Clean up legacy test scaffolding in cudf-polars#22535
Conversation
| engine: GPUEngine, | ||
| collect_kwargs: CollectKwargs | None = None, | ||
| polars_collect_kwargs: CollectKwargs | None = None, | ||
| cudf_collect_kwargs: CollectKwargs | None = None, |
| def _process_kwargs( | ||
| collect_kwargs: CollectKwargs | None, | ||
| polars_collect_kwargs: CollectKwargs | None, | ||
| cudf_collect_kwargs: CollectKwargs | None, | ||
| ) -> tuple[CollectKwargs, CollectKwargs]: | ||
| if collect_kwargs is None: | ||
| collect_kwargs = {} | ||
| final_polars_collect_kwargs = collect_kwargs.copy() | ||
| final_cudf_collect_kwargs = collect_kwargs.copy() | ||
| if polars_collect_kwargs is not None: # pragma: no cover; not currently used | ||
| final_polars_collect_kwargs.update(polars_collect_kwargs) | ||
| if cudf_collect_kwargs is not None: # pragma: no cover; not currently used | ||
| final_cudf_collect_kwargs.update(cudf_collect_kwargs) | ||
| return final_polars_collect_kwargs, final_cudf_collect_kwargs |
There was a problem hiding this comment.
Inlining, the function is only called once now.
| return final_polars_collect_kwargs, final_cudf_collect_kwargs | ||
|
|
||
|
|
||
| def assert_collect_raises( |
There was a problem hiding this comment.
Inlining the function is simpler to understand IMO. We now just do:
- assert_collect_raises(
- q,
- cudf_except=pl.exceptions.ComputeError,
- polars_except=pl.exceptions.InvalidOperationError,
- )
+ with pytest.raises(pl.exceptions.InvalidOperationError):
+ q.collect()
+ with pytest.raises(pl.exceptions.ComputeError):
+ q.collect(engine=pl.GPUEngine(executor="in-memory", raise_on_fail=True))
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR simplifies the cuDF Polars test assertion API by removing the ChangesAssertion helper refactor and test migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
Description
Removes
assert_collect_raises, its callers, and the leftoverexecutor=-era keyword plumbing that is no longer used anywhere else.