Repository navigation
Python tests: replace iterator argvalues before pytest 10 - #92
Open
olivhoenen wants to merge 1 commit into
Open
olivhoenen wants to merge 1 commit into
olivhoenen wants to merge 1 commit into
Conversation
itertools.product returns a one-shot iterator; passing it directly as parametrize argvalues is deprecated (PytestRemovedIn10Warning) and becomes a collection error in pytest 10. Materialize it with list(). Make PytestRemovedIn10Warning an error in [tool.pytest.ini_options] filterwarnings so every pytest run (local and CI) fails on removed-in-10 usage before an unbounded pytest upgrade does. Verified: python -m pytest python/tests -W error::pytest.PytestRemovedIn10Warning passes (15 passed, 5 skipped), all six test_ALException cases still collect, and the old iterator pattern now fails collection under the new filter. Closes #48 (cherry picked from commit 7274728)
This was referenced Oct 14, 2026
This branch has not been 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.
Part of the split of #85 (Tests and Benchmarks for regression) into smaller, single-purpose PRs that are easier to review.
pytest 10 rejects non-Collection iterables as
parametrizeargvalues:test_exception.pynow materializes itsitertools.productinto a list, andpyproject.tomlturnsPytestRemovedIn10Warninginto an error so similar usage fails early.Fork history: yohannmarguier#48
Stack position: independent, based on
develop.Authorship: these commits are @yohannmarguier's, cherry-picked unchanged from his fork with
git cherry-pick -x, so each one keeps its original author, date and message plus a(cherry picked from commit …)link back to the fork. Only conflicts with currentdevelopand with the new commit order were resolved.🤖 Generated with Claude Code