Skip to content

Commit 1ac5267

Browse files
committed
Add quick comment and improve CHANGELOG a bit
1 parent 13b9107 commit 1ac5267

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changelog/5811.bugfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Handle --fulltrace with pytest.raises.
1+
Handle ``--fulltrace`` correctly with ``pytest.raises``.

src/_pytest/nodes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,15 @@ def _repr_failure_py(self, excinfo, style=None):
272272
except OSError:
273273
abspath = True
274274

275+
# traceback has been pruned at this point already if not in --fulltrace mode
276+
tbfilter = False
277+
275278
return excinfo.getrepr(
276279
funcargs=True,
277280
abspath=abspath,
278281
showlocals=self.config.getoption("showlocals", False),
279282
style=style,
280-
tbfilter=False,
283+
tbfilter=tbfilter,
281284
truncate_locals=truncate_locals,
282285
)
283286

0 commit comments

Comments
 (0)