pytest-dev / pytest-dev/pytest

fixtures: `--fixtures`/`--fixtures-per-test` don't go through `pytest_collection`

Open
#15,049 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.