pytest-dev / pytest-dev/pytest

Mark autouse fixtures in `--setup-show` (and friends) and `--fixtures-per-test`

Open
#14,920 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

topic: fixtures topic: reporting
Dominant language
Python
Stars
14.5k
Forks
3.4k
Avg merge
2d 9h
Merged PRs (30d)
35

Description

In my pytest trainings, people often use --setup-show and/or --fixtures-per-test and then are surprised that they see fixtures they did not specify as arguments. Those are typically autouse fixtures which are provided by plugins, which I have installed for later course chapters.

I think it would help if those commands would show those fixtures as something like [autouse], and/or dim them in the output. What do people think?

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.

Research direction

Start by locating the implementations and tests for --setup-show and --fixtures-per-test, then inspect how fixture output is formatted. Done means autouse fixtures are clearly identified or visually distinguished in both commands, with tests covering the updated output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.