Skip to content

Commit 4194ddd

Browse files
committed
Merge pull request #1417 from hackebrot/fix-docs-on-traceback-styles
Fix docs on traceback styles
2 parents b64aaac + ab90043 commit 4194ddd

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGELOG.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,18 @@
9494
* Fix formatting utf-8 explanation messages (`#1379`_).
9595
Thanks `@biern`_ for the PR.
9696

97-
*
97+
* Fix `traceback style docs`_ to describe all of the available options
98+
(auto/long/short/line/native/no), with `auto` being the default since v2.6.
99+
Thanks `@hackebrot`_ for the PR.
98100

99101
*
100102

101103
*
102104

103105
*
104106

107+
.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing
108+
105109
.. _#1379: https://github.com/pytest-dev/pytest/issues/1379
106110
.. _#1366: https://github.com/pytest-dev/pytest/issues/1366
107111
.. _#1040: https://github.com/pytest-dev/pytest/pull/1040
@@ -124,6 +128,7 @@
124128
.. _@tomviner: https://github.com/tomviner
125129
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
126130
.. _@rabbbit: https://github.com/rabbbit
131+
.. _@hackebrot: https://github.com/hackebrot
127132

128133
2.8.7
129134
-----

doc/en/usage.rst

+6-3
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ Examples for modifying traceback printing::
6666
py.test --showlocals # show local variables in tracebacks
6767
py.test -l # show local variables (shortcut)
6868

69-
py.test --tb=long # the default informative traceback formatting
70-
py.test --tb=native # the Python standard library formatting
71-
py.test --tb=short # a shorter traceback format
69+
py.test --tb=auto # (default) 'long' tracebacks for the first and last
70+
# entry, but 'short' style for the other entries
71+
py.test --tb=long # exhaustive, informative traceback formatting
72+
py.test --tb=short # shorter traceback format
7273
py.test --tb=line # only one line per failure
74+
py.test --tb=native # Python standard library formatting
75+
py.test --tb=no # no traceback at all
7376

7477
Dropping to PDB_ (Python Debugger) on failures
7578
-----------------------------------------------

0 commit comments

Comments
 (0)