| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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 on the highest-resolution CI lanes. find_examples() returns a generator; materialize it as a list.
There was a problem hiding this comment.
LGTM — straightforward pytest 9.1.0 compat fix, materializing the find_examples() generator into a list for parametrize.
Extended reasoning...This PR changes a single line in tests/test_examples.py, wrapping find_examples("README.md") in list(...) so the value passed to pytest.mark.parametrize is a materialized Collection rather than a generator. This addresses PytestRemovedIn10Warning in pytest 9.1.0, which under filterwarnings = ["error"] was failing test collection on the highest-resolution CI lanes.
None. The change is confined to test infrastructure and does not touch any shipped code, auth, crypto, or permissions.
Minimal scrutiny warranted. This is a mechanical, idiomatic fix that pytest's own deprecation message explicitly recommends ("convert to a list or tuple"). Generators are single-pass, and parametrize iterates the argument once during collection, so materializing to a list is semantically equivalent and strictly safer.
No bugs were reported by the bug hunting system, no prior review comments exist on the timeline, and the diff is a single self-contained line with clear intent. The behavior of test_docs_examples is unchanged.
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 on the highest-resolution CI lanes (all lowest-direct lanes pass since they pin an older pytest).
pytest_examples.find_examples() returns a generator; materialize it as a list. This is the fix pytest's own message recommends ("Please convert to a list or tuple").
Test-infrastructure only; no change to shipped code. Unblocks the v1.28.0 publish run.
The same change will be needed on main.
AI Disclaimer