mirror of
https://github.com/python/cpython
synced 2024-10-14 09:01:41 +00:00
bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221)
This commit is contained in:
parent
e56d54e447
commit
ba876c44a8
|
@ -183,7 +183,8 @@ def _exc_info_to_string(self, err, test):
|
|||
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 a new issue