Skip to content

Commit ed8701a

Browse files
authored
Mention -q and -s in the docs (#11558)
Fixes #11507.
1 parent 2474368 commit ed8701a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/en/how-to/output.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Examples for modifying traceback printing:
1616
pytest -l # show local variables (shortcut)
1717
pytest --no-showlocals # hide local variables (if addopts enables them)
1818
19+
pytest --capture=fd # default, capture at the file descriptor level
20+
pytest --capture=sys # capture at the sys level
21+
pytest --capture=no # don't capture
22+
pytest -s # don't capture (shortcut)
23+
pytest --capture=tee-sys # capture to logs but also output to sys level streams
24+
1925
pytest --tb=auto # (default) 'long' tracebacks for the first and last
2026
# entry, but 'short' style for the other entries
2127
pytest --tb=long # exhaustive, informative traceback formatting
@@ -36,6 +42,16 @@ option you make sure a trace is shown.
3642
Verbosity
3743
--------------------------------------------------
3844

45+
Examples for modifying printing verbosity:
46+
47+
.. code-block:: bash
48+
49+
pytest --quiet # quiet - less verbose - mode
50+
pytest -q # quiet - less verbose - mode (shortcut)
51+
pytest -v # increase verbosity, display individual test names
52+
pytest -vv # more verbose, display more details from the test output
53+
pytest -vvv # not a standard , but may be used for even more detail in certain setups
54+
3955
The ``-v`` flag controls the verbosity of pytest output in various aspects: test session progress, assertion
4056
details when tests fail, fixtures details with ``--fixtures``, etc.
4157

0 commit comments

Comments
 (0)