fix: pytest-9 pytest_ignore_collect signature (unbreaks CI) - #9
Merged
Conversation
pytest 9 removed the legacy one-argument pytest_ignore_collect(path) hook form; every CI run failed with a PluginValidationError before collecting a single test. Use the collection_path/config signature (supported since pytest 7, so older environments keep working), with a robust Path-based scrap-dir match instead of the old substring test. Verified locally: pytest --doctest-modules taped -> 7 passed, 1 skipped, taped/scrap excluded from collection. Claude-Session: https://claude.ai/code/session_01GUjT9e7sAyckG1SR9czApr
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.
CI on master has been red since October: pytest 9 removed the legacy one-argument
pytest_ignore_collect(path)hook form, so every run died with aPluginValidationErrorbefore collecting a single test.This switches
conftest.pyto thecollection_path/configsignature (supported since pytest 7 — older environments keep working) and replaces the substring scrap-dir test with a robustPathcomparison.Verified locally (emulating the isee pytest-validation action's command):
pytest -v --doctest-modules taped→ 7 passed, 1 skipped,taped/scrapexcluded.Known fleet-wide blocker per the ecosystem rollout notes; this is the taped instance of it.
https://claude.ai/code/session_01GUjT9e7sAyckG1SR9czApr