pytest-dev / pytest-dev/pytest

Get help for only custom options

Open
#9,452 8 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What's the problem this feature will solve?

I'd like to be able to see the help descriptions to custom options. This is currently available via pytest --help, but is overwhelmed by all the other help information in this output (~350 lines of output in my setup).

Describe the solution you'd like

Something akin to

pytest --help --custom-only

or

pytest --help --section custom

to only display options for a given section. Either of these would produce the console output

custom options:
  --option1=OPTION1           Description of option1 here.
  --option2=OPTION2           Description of option2 here.
Alternative Solutions

I could try to subset the current output of pytest --help, however it seems to me there are no reliable delimiters for the beginning and ending of a certain section.

Additional context

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 running pytest --help and examining how the custom-options section appears in the output. Define how a user selects one help section, including the proposed --custom-only or --section custom forms, and verify that the result contains only the selected section with its descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.