pytest-dev / pytest-dev/pytest
fixtures: `--fixtures`/`--fixtures-per-test` don't go through `pytest_collection`
Open
@bluetech is already working on this.
Since Sep 17, 2026.
topic: collection
topic: fixtures
type: backward compatibility
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
These two modes currently use session.perform_collect() directly to perform the collection.
I don't see a reason for them to bypass the regular collection hook. If plugins do things with the hook on a regular run, they should do it for these two modes as well, just as they do with --collect-only.
This could possibly cause some breakage (though unlikely I think), so let's schedule this for pytest 10.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.