| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
pytest 9.1.0 deprecates passing a non-Collection iterable (e.g. a generator) to pytest.mark.parametrize, raising PytestRemovedIn10Warning. With filterwarnings = ["error"] this fails collection. find_examples() returns a generator; materialize it as a list. Same fix as #2889 on v1.x. main's CI matrix uses locked resolution so this is not currently failing there, but it future-proofs against a pytest bump.
There was a problem hiding this comment.
LGTM — straightforward one-line test fix wrapping find_examples() in list() for pytest 9.1.0 parametrize compatibility.
Extended reasoning...This PR changes a single line in tests/test_examples.py, wrapping find_examples("README.v2.md") in list(...) so that pytest.mark.parametrize receives a materialized Collection rather than a generator. This is test-only code with no impact on the library or any production code path.
None. The change touches only test collection/parametrization and introduces no new inputs, network, auth, or data-handling logic.
Low. This is a mechanical, well-understood fix: pytest 9.1.0 deprecates passing non-Collection iterables to parametrize, and the canonical remedy is to materialize the generator into a list. The PR description notes it mirrors #2889 on v1.x and was verified locally (45 tests pass under pytest 9.1.0 with -W error).
No bugs were reported by the bug hunting system, the diff is a single line, intent is clear, and there is no reviewer discussion outstanding. ids=str behavior is unchanged. Safe to approve without human review.
Sorry, something went wrong.
|
This pull request is included in pre-release v2.0.0a3 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
pytest 9.1.0 deprecates passing a non-Collection iterable (e.g. a generator) to pytest.mark.parametrize, raising PytestRemovedIn10Warning. With filterwarnings = ["error"] this fails collection. pytest_examples.find_examples() returns a generator; materialize it as a list.
Same fix as #2889 on v1.x. main's CI matrix uses locked resolution (pytest 8.4.2) so this is not currently failing there, but it future-proofs against the next pytest bump in uv.lock. Verified locally that tests/test_examples.py collects clean and all 45 tests pass under pytest 9.1.0 with -W error.
The uv.lock bump to 9.1.0 is deliberately left for a separate PR.
AI Disclaimer