Skip to content

Commit 02f1385

Browse files
gh-117606: Truncate extremely long error message in test_exceptions (#117670)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 993c3cc commit 02f1385

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_exceptions.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,8 @@ def test_recursion_normalizing_infinite_exception(self):
14511451
"""
14521452
rc, out, err = script_helper.assert_python_failure("-c", code)
14531453
self.assertEqual(rc, 1)
1454-
self.assertIn(b'RecursionError: maximum recursion depth exceeded', err)
1454+
expected = b'RecursionError: maximum recursion depth exceeded'
1455+
self.assertTrue(expected in err, msg=f"{expected!r} not found in {err[:3_000]!r}... (truncated)")
14551456
self.assertIn(b'Done.', out)
14561457

14571458

0 commit comments

Comments
 (0)