pytest-dev / pytest-dev/pytest

Option to display markers in `--collect-only` output (in order to `grep` for skipped all skipped tests)

Open
#1,509 12 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: marks topic: selection type: proposal
Dominant language
Python
Stars
14.5k
Forks
3.4k
Avg merge
2d 9h
Merged PRs (30d)
35

Description

We're skipping many of our tests and I think this is due to some missing functionality.

In order to see all the skipped tests, I have to run all the tests in verbose mode, store the output, and grep -E 'xfail|xpass' in order to see all of the specific tests that are skipped.

If there isn't a better way to already do this. I was thinking what if in the --collect-only output we could also see markers like skip or even custom markers for each test. That way I could easily collect the tests and grep for skipped ones without having to run all of them again.

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 with the --collect-only output path and the existing handling of skip, xfail, xpass, and custom markers. Determine how collected tests are rendered and how marker information could be shown without running tests. Done means skipped and other marker-bearing tests are visible in collect-only output and can be filtered with grep.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.