Skip to content

test: the interleaved-args probe runs unconditionally instead of skipping - #447

Merged
rcbevans merged 3 commits into
mainfrom
fix/fixture-resolution-unskipped
Sep 23, 2026
Merged

rcbevans merged 3 commits into
mainfrom
fix/fixture-resolution-unskipped

Conversation

@rcbevans

Copy link
Copy Markdown
Contributor

Root-cause fix for the every-board skip at test_web_admin_fixture_resolution.py:111 (pytest 9.1.1 predates the #14968 backport of #14971: nested conftest fixtures drop under interleaved file args). Empirically pinned the mechanism on scratch projects, then restructured the probe: root-conftest fixture + per-module inline fixtures dodge the Directory re-collection bug entirely, so the SAME order-independence semantics are verified on every run - no skip, no version gate. The nested-conftest variant can return when the locked pytest ships the backport (recorded in a comment). Probe green x3 both orderings plus randomized; guards untouched; ruff/format/pyright clean.

…ping

pytest-dev/pytest#14968 (the 9.1.x backport of the pytest-dev/pytest#14971
fix) is still unreleased: PyPI's newest pytest is 9.1.1, so there is no
version to adopt and the upstream-behavior probe version-gated on (9, 2, 0)
skipped on every board, verifying nothing.

The upstream bug is specific to fixtures defined in a nested conftest.py
(re-collection of the revisited directory builds a second Directory node and
fixture registration matches by node identity). Fixtures that do not ride a
re-collected Directory node - the root conftest.py and each test module's
own fixtures - resolve under the same interleaving; verified against 9.1.1
and 8.4.2 scratch projects, with the nested-conftest negative control
erroring on 9.1.1 exactly as upstream reports.

Replace the skip with a probe of that scenario: root conftest fixture plus
per-module fixtures, asserted under both argument orderings. The nested
conftest shape stays covered at the repo level by the two guards (web_admin
fixtures registered from tests/conftest.py). A nested-conftest variant of
the probe can be added once the pin moves past the release that ships the
backport.
@rcbevans
rcbevans merged commit b84f8f1 into main Sep 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants