Repository navigation
test(ddxdb): compare rows with approx as dicts, as pytest 9.2 requires - #215
Conversation
pytest 9.2.0 (released 2026-10-27) raises TypeError on approx of nested data, such as a list of (key, value) pairs, which seven assertions used. Each now compares dict(pairs(...)) with approx of a dict, as the other tests already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CvszJhH8pn8H9G69wEPMU2
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Keyed result assertions python/ddxdb/tests/test_ad.py, python/ddxdb/tests/test_duckdb.py |
Gradient and Hessian-vector-product tests, plus DuckDB tests, compare keyed results as dictionaries. Expected values remain unchanged. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Possibly related PRs
- xqlsystems/ddx#192: Added DuckDB shared-loss tests whose assertions this PR changes to dictionary comparisons.
- xqlsystems/ddx#200: Added the window-differentiation and documentation-example tests whose assertions this PR changes to dictionary comparisons.
Suggested labels: testing
Merge Risk: 
Minimal · up to 1aa62
-
The PR only adjusts test comparison semantics and introduces no established merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Why
pytest 9.2.0, released 2026-10-27, raises
TypeError: pytest.approx() does not support nested data structures. Seven ddxdb assertions compared a list of(key, value)pairs withapprox. CI installs the newest pytest (pytest>=7), so ddxdb's wheel jobs fail on every PR, as they do on #214.How
Each of the seven compares
dict(pairs(...))withapproxof a dict instead, as the other ddxdb tests already do. Tests only.Tests
Under pytest 9.2.0, main's ddxdb tests have 7 failures. This branch's pass (116 passed, 1 xfailed).
🤖 Generated with Claude Code
https://claude.ai/code/session_01CvszJhH8pn8H9G69wEPMU2
Summary by CodeRabbit