pytest_plugin(fix[pytest_ignore_collect]): abstain with None#544
Merged
Conversation
9c8da0d to
bed8828
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #544 +/- ##
==========================================
+ Coverage 61.26% 61.34% +0.08%
==========================================
Files 40 40
Lines 6557 6571 +14
Branches 1103 1104 +1
==========================================
+ Hits 4017 4031 +14
Misses 1946 1946
Partials 594 594 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
why: pytest_ignore_collect is a firstresult hook, so the first non-None return wins and short-circuits the remaining implementations. The fall-through returned False, silently overriding gp-libs' Sphinx _build skip and pytest's builtin __pycache__/norecursedirs/collect_ignore handling — aborting collection on generated docs under docs/_build. what: - Return None to abstain on paths with no missing VCS binary - Widen the return annotation to bool | None Refs #543
why: Lock in that the firstresult hook abstains with None rather than voting False, so it no longer suppresses other collection-ignore hooks. what: - Abstain (None) on a non-VCS path regardless of installed binaries - Ignore (True) when a VCS binary is missing - Abstain (None) when the binary is present Refs #543
bed8828 to
44161ab
Compare
why: Record the unreleased pytest-plugin fix so downstream users see it in the next release notes.
tony
added a commit
that referenced
this pull request
Jul 11, 2026
why: Ship the pytest plugin collection-ignore fix, which aborts collection for downstream suites that build docs before running tests, plus the runnable-doctest documentation pass. what: - Bump version to 0.45.1 in pyproject.toml, __about__.py, and uv.lock - Date the 0.45.1 CHANGES entry below the 0.46.x unreleased block - Promote the #544 fix from a bullet to a titled deliverable
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.
Summary
libvcs.pytest_plugin.pytest_ignore_collectreturned a concreteFalseinits fall-through instead of
None.pytest_ignore_collectis afirstresult=Truehook, so the first implementation to return a non-
Nonevalue wins andshort-circuits the rest. libvcs's implementation runs first, so its
Falsesilently suppressed every other implementation — gp-libs'
_buildskipand pytest's own
__pycache__/norecursedirs/collect_ignorehandling.The user-visible symptom: after building the docs, the suite aborts during
collection on the generated Sphinx output, whose copied sources have relative
{include}targets that don't resolve fromdocs/_build/:Full root-cause writeup in #543.
Fix
Return
None(abstain) from every non-matching branch so thefirstresultchain continues to gp-libs and pytest's builtin. The hook still returns
Trueonly to skip tests whose VCS binary is missing. The return annotation widens
to
bool | Noneaccordingly.Testing
uv run pytest— 660 passed, 1 skipped; collection no longer aborts withstale
docs/_build/output on disk.tests/test_pytest_plugin.pycover: abstain(
None) on a non-VCS path, ignore (True) when a VCS binary is missing, andabstain when the binary is present.
uv run ruff checkanduv run mypyclean.Closes #543