fix(pytest-matrix): put .venv/bin on PATH so which()-gated tests do not silently skip#12
Merged
Merged
Conversation
…ot silently skip
Console scripts installed into the venv are not resolvable from inside
the test process, so any test gating on `shutil.which("<tool>")` SKIPS.
A skip is not a failure, so the suite still reports green while the gate
never ran — the check that could not run reports what a check that passed
reports.
Observed in scitex-ai/scitex-hub#433: tests/develop/test_audit.py (the
brand quality gate) was PASSED on the retired setup-python workflow and
became SKIPPED under this reusable, because scitex-dev was installed into
.venv but absent from PATH. It sat inside a green '2289 passed'.
quality-audit.yml already exports this same PATH; this brings pytest-matrix
to parity.
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.
Console scripts installed into the venv are not resolvable from inside the test process, so any test gating on
shutil.which("<tool>")skips. A skip is not a failure, so the suite still reports green while the gate never ran.Evidence
In scitex-ai/scitex-hub#433,
tests/develop/test_audit.py::test_audit_all_clean— the repo's brand quality gate — differs across the two environments on the same code:actions/setup-pythonjobPASSED(and emitted its 150-masked-violations warning, i.e. it did the work)SKIPPED (scitex-de...)scitex-devis installed into.venvby-e ".[all,dev]", butshutil.which("scitex-dev")returnsNonebecause.venv/binis not on PATH. The skip sat inside a green 2289 passed.Fix
export PATH="$PWD/.venv/bin:$PATH"before pytest — the same linequality-audit.ymlalready runs. This is a parity fix, not a behavior change: it re-arms a gate that the unification silently disarmed.