Repository navigation
Replace request.param fixture selection with typed parameters - #3299
Merged
Merged
Conversation
This branch was successfully deployed
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.
Report month, image source, and file mode selection currently depend on parametrized fixtures reading
request.param. Replace them with ordinary typed test parameters and a shared image factory fixture that owns file handles throughExitStack.Retain all 467 collected case IDs and every existing assertion, including the buffer cases repeated for both file modes. Keep fixture annotations importable at runtime for pytest-beartype, and check the factory's source, mode, and return type with Beartype.
Validation: final full suites on Python 3.14 and final Python 3.15 each pass all 467 cases with 100% branch coverage; all four type checkers and public type completeness; applicable pre-commit hooks and Pylint; direct checks for image bytes, file cleanup, buffer ownership, and invalid source/mode rejection. Local Mypy used
MYPY_NUM_WORKERS=0.Existing limitation: selecting only
README.rstanddocs/source/index.rstenables package import checking and fails three examples becausevws.reports._checkedannotateshintastype[T]while receiving a generic alias. The same failure reproduces on unchangedmain. The repository's complete test collection passes its documentation examples; its existing package-check configuration remains enabled.