What's the problem this feature will solve?
The -r option ("report chars") in pytest currently has no corresponding long-form option. This is inconsistent with other CLI flags, which typically support both short and long forms (e.g., -q / --quiet, -v / --verbose). The lack of a --report-chars long form makes the CLI less discoverable and less self-documenting, especially for users who prefer explicit and descriptive long options.
|
group._addoption( # private to use reserved lower-case short option |
|
"-r", |
Describe the solution you'd like
Add a long-form CLI option equivalent to -r, such as:
This flag would behave exactly like -r and accept the same character sets.
Example:
pytest --report-chars=fE
pytest --report-chars=a
This makes pytest's CLI more consistent and easier to understand.
Alternative Solutions
Possible workarounds include:
- Using only the short-form
-r option (current state).
- Asking users to use a wrapper script or shell alias.
None address the core inconsistency in pytest's CLI.
Additional context
What's the problem this feature will solve?
The
-roption ("report chars") in pytest currently has no corresponding long-form option. This is inconsistent with other CLI flags, which typically support both short and long forms (e.g.,-q/--quiet,-v/--verbose). The lack of a--report-charslong form makes the CLI less discoverable and less self-documenting, especially for users who prefer explicit and descriptive long options.pytest/src/_pytest/terminal.py
Lines 190 to 191 in 64e3c91
Describe the solution you'd like
Add a long-form CLI option equivalent to
-r, such as:This flag would behave exactly like
-rand accept the same character sets.Example:
This makes pytest's CLI more consistent and easier to understand.
Alternative Solutions
Possible workarounds include:
-roption (current state).None address the core inconsistency in pytest's CLI.
Additional context