refactor(tests): inline ids and descriptions in point evaluation params#2907
Merged
felix314159 merged 1 commit intoMay 27, 2026
Conversation
In test_valid_inputs and test_invalid_inputs: - Convert tuple params to `pytest.param(..., id=...)` so each case's identifier lives next to its values; drop the parallel `ids=[...]` list in test_invalid_inputs. - Move the per-case descriptions out of the function docstrings and into inline comments above the relevant pytest.param(s); shrink each docstring to a one-line summary. - Replace the magic `0xC0 << 376` with the existing `INF_POINT` constant in Spec.kzg_to_versioned_hash() calls. - Use idiomatic byte literals (`b""`, `b"\x00"`, `b"\x00" * 1023`) instead of `bytes()` / `bytes([0])` / `bytes([0] * 1023)`. No fixture changes (t8n cache 100% hit on all 14 cases).
456f7b0 to
fa5504c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2907 +/- ##
================================================
Coverage 90.44% 90.44%
================================================
Files 535 535
Lines 32439 32439
Branches 3012 3012
================================================
Hits 29338 29338
Misses 2573 2573
Partials 528 528
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Description
This is done to lower the review/maintenance cost of adding the test cases.
In test_valid_inputs and test_invalid_inputs:
pytest.param(..., id=...)so each case's identifier lives next to its values; drop the parallelids=[...]list in test_invalid_inputs.0xC0 << 376with the existingINF_POINTconstant in Spec.kzg_to_versioned_hash() calls.b"",b"\x00",b"\x00" * 1023) instead ofbytes()/bytes([0])/bytes([0] * 1023).No fixture changes (t8n cache 100% hit on all 14 cases).
🔗 Related Issues or PRs
#2909
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.