Skip to content

Commit 2a50857

Browse files
miss-islingtonnineteendoAlexWaygood
authored
[3.12] gh-117606: Truncate extremely long error message in test_exceptions (GH-117670) (#117745)
gh-117606: Truncate extremely long error message in `test_exceptions` (GH-117670) (cherry picked from commit 02f1385) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent 04d0796 commit 2a50857

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,8 @@ def test_recursion_normalizing_infinite_exception(self):
14481448
"""
14491449
rc, out, err = script_helper.assert_python_failure("-c", code)
14501450
self.assertEqual(rc, 1)
1451-
self.assertIn(b'RecursionError: maximum recursion depth exceeded', err)
1451+
expected = b'RecursionError: maximum recursion depth exceeded'
1452+
self.assertTrue(expected in err, msg=f"{expected!r} not found in {err[:3_000]!r}... (truncated)")
14521453
self.assertIn(b'Done.', out)
14531454

14541455

0 commit comments

Comments
 (0)