mirror of https://github.com/python/cpython
bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221)
This commit is contained in:
parent
e56d54e447
commit
ba876c44a8
|
@ -183,7 +183,8 @@ class TestResult(object):
|
|||
else:
|
||||
length = None
|
||||
tb_e = traceback.TracebackException(
|
||||
exctype, value, tb, limit=length, capture_locals=self.tb_locals)
|
||||
exctype, value, tb,
|
||||
limit=length, capture_locals=self.tb_locals, compact=True)
|
||||
msgLines = list(tb_e.format())
|
||||
|
||||
if self.buffer:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Use :class:`~traceback.TracebackException`'s new ``compact`` param in
|
||||
:class:`~unittest.TestResult` to reduce time and memory consumed by
|
||||
traceback formatting.
|
Loading…
Reference in New Issue