summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorIrit Katriel <iritkatriel@yahoo.com>2021-01-15 15:59:44 (GMT)
committerGitHub <noreply@github.com>2021-01-15 15:59:44 (GMT)
commitba876c44a8d06668e622fb580fdcde45c7a36d48 (patch)
treedd94a269c365e2580990a0b4a4d8e3a74be0de99 /Lib/unittest
parente56d54e447694c6ced2093d2273c3e3d60b36b6f (diff)
downloadcpython-ba876c44a8d06668e622fb580fdcde45c7a36d48.zip
cpython-ba876c44a8d06668e622fb580fdcde45c7a36d48.tar.gz
cpython-ba876c44a8d06668e622fb580fdcde45c7a36d48.tar.bz2
bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221)
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/result.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py
index 111317b..ce7468e 100644
--- a/Lib/unittest/result.py
+++ b/Lib/unittest/result.py
@@ -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: