Skip to content

fix: load test* subdir conftests when initial path is missing#14622

Merged
bluetech merged 1 commit into
pytest-dev:mainfrom
chrisburr:fix-14608-initial-conftest-test-subdir
Jun 19, 2026
Merged

fix: load test* subdir conftests when initial path is missing#14622
bluetech merged 1 commit into
pytest-dev:mainfrom
chrisburr:fix-14608-initial-conftest-test-subdir

Conversation

@chrisburr

Copy link
Copy Markdown

This PR fixes a mistake in the 9.1.0 rewrite of _set_initial_conftests (#14307) that led to #14608. I saw this issue in my own project and have verified that the included test reproduces the failure and this PR then fixes it.

Closes #14608

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jun 18, 2026
…ot be initial

Regressed in b665afc.

Fix pytest-dev#14608.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
@bluetech bluetech force-pushed the fix-14608-initial-conftest-test-subdir branch from 569c581 to f36b07a Compare June 18, 2026 14:01

@bluetech bluetech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this.

(I made some tweaks)

@bluetech bluetech added the backport 9.1.x apply to PRs at any point; backports the changes to the 9.1.x branch label Jun 18, 2026
@bluetech bluetech merged commit b375b79 into pytest-dev:main Jun 19, 2026
36 checks passed
@patchback

patchback Bot commented Jun 19, 2026

Copy link
Copy Markdown

Backport to 9.1.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/9.1.x/b375b79ec913630af83ceff58944347408a6534a/pr-14622

Backported as #14624

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bluetech added a commit that referenced this pull request Jun 19, 2026
…est-subdir

fix: load test* subdir conftests when initial path is missing
(cherry picked from commit b375b79)
bluetech added a commit that referenced this pull request Jun 19, 2026
…375b79ec913630af83ceff58944347408a6534a/pr-14622

[PR #14622/b375b79e backport][9.1.x] fix: load test* subdir conftests when initial path is missing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 9.1.x apply to PRs at any point; backports the changes to the 9.1.x branch bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest 9.1.0: conftest.py addoption regressed in nested directories

2 participants