From a95fe3693b9b2835d2bcff0916cd828c6bb4ac9e Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 27 Feb 2016 20:54:09 +0000 Subject: [PATCH 1/2] Add auto to tb styles (new default since v2.6) --- doc/en/usage.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/en/usage.rst b/doc/en/usage.rst index b8abb87e9..4b92fd1e1 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -66,10 +66,13 @@ Examples for modifying traceback printing:: py.test --showlocals # show local variables in tracebacks py.test -l # show local variables (shortcut) - py.test --tb=long # the default informative traceback formatting - py.test --tb=native # the Python standard library formatting - py.test --tb=short # a shorter traceback format + py.test --tb=auto # (default) 'long' tracebacks for the first and last + # entry, but 'short' style for the other entries + py.test --tb=long # exhaustive, informative traceback formatting + py.test --tb=short # shorter traceback format py.test --tb=line # only one line per failure + py.test --tb=native # Python standard library formatting + py.test --tb=no # no traceback at all Dropping to PDB_ (Python Debugger) on failures ----------------------------------------------- From ab90043adc9c3a29190d5ee0fa0e3d4732b41654 Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 27 Feb 2016 21:02:03 +0000 Subject: [PATCH 2/2] Update changelog with traceback style docs fix --- CHANGELOG.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1d83e6b7b..533a5e39e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -94,7 +94,9 @@ * Fix formatting utf-8 explanation messages (`#1379`_). Thanks `@biern`_ for the PR. -* +* Fix `traceback style docs`_ to describe all of the available options + (auto/long/short/line/native/no), with `auto` being the default since v2.6. + Thanks `@hackebrot`_ for the PR. * @@ -102,6 +104,8 @@ * +.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing + .. _#1379: https://github.com/pytest-dev/pytest/issues/1379 .. _#1366: https://github.com/pytest-dev/pytest/issues/1366 .. _#1040: https://github.com/pytest-dev/pytest/pull/1040 @@ -124,6 +128,7 @@ .. _@tomviner: https://github.com/tomviner .. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt .. _@rabbbit: https://github.com/rabbbit +.. _@hackebrot: https://github.com/hackebrot 2.8.7 -----