From 1ac5267be2bb04ab9640e2a5df09179be002e20d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 13 Sep 2019 19:22:02 -0300 Subject: [PATCH] Add quick comment and improve CHANGELOG a bit --- changelog/5811.bugfix.rst | 2 +- src/_pytest/nodes.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog/5811.bugfix.rst b/changelog/5811.bugfix.rst index 8e3810dad8c..a052eb03a35 100644 --- a/changelog/5811.bugfix.rst +++ b/changelog/5811.bugfix.rst @@ -1 +1 @@ -Handle --fulltrace with pytest.raises. +Handle ``--fulltrace`` correctly with ``pytest.raises``. diff --git a/src/_pytest/nodes.py b/src/_pytest/nodes.py index 1ad5ec1a995..d8e218a4b26 100644 --- a/src/_pytest/nodes.py +++ b/src/_pytest/nodes.py @@ -272,12 +272,15 @@ def _repr_failure_py(self, excinfo, style=None): except OSError: abspath = True + # traceback has been pruned at this point already if not in --fulltrace mode + tbfilter = False + return excinfo.getrepr( funcargs=True, abspath=abspath, showlocals=self.config.getoption("showlocals", False), style=style, - tbfilter=False, + tbfilter=tbfilter, truncate_locals=truncate_locals, )