Conversation
Co-authored-by: Ran Benita <ran@unusedvar.com> (cherry picked from commit 922b603)
bluetech
approved these changes
Nov 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #13930 as merged into main (922b603).
Addresses #13973
Summary
Previously, pytest command-line options were only visible via
pytest --help, making them difficult to discover and browse online. This PR adds a dedicated CLI options reference page to improve discoverability and provide a better documentation experience.Changes
Added a new documentation page (
doc/en/how-to/cli-options.rst) that organizes commonly used pytest CLI options into logical categories:-k,-m,-x,--maxfail,--lf,--ff,--sw)-v,-q,--tb,-l,-r)--junit-xml,--durations,-s)--collect-only,--pyargs,--ignore)--pdb,--trace,--fixtures,--setup-show)-c,--basetemp,-o)--log-cli-level,--log-level,--log-file)--disable-warnings,-W)Each section includes clear examples, brief explanations, and cross-references to related documentation. The page also links to the complete command-line flag reference for users who need the exhaustive list.
Files Changed
doc/en/how-to/cli-options.rst- new CLI options reference page (307 lines)doc/en/how-to/index.rst- added the new page to the table of contentschangelog/4492.doc.rst- changelog entryTesting
The documentation was successfully built using Sphinx with no errors. All cross-references are valid and the generated HTML renders correctly.