Skip to content

Commit

Permalink
pythongh-117606: Truncate extremely long error message in `test_excep…
Browse files Browse the repository at this point in the history
…tions` (python#117670)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
nineteendo and AlexWaygood committed Apr 11, 2024
1 parent 993c3cc commit 02f1385
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,8 @@ def test_recursion_normalizing_infinite_exception(self):
"""
rc, out, err = script_helper.assert_python_failure("-c", code)
self.assertEqual(rc, 1)
self.assertIn(b'RecursionError: maximum recursion depth exceeded', err)
expected = b'RecursionError: maximum recursion depth exceeded'
self.assertTrue(expected in err, msg=f"{expected!r} not found in {err[:3_000]!r}... (truncated)")
self.assertIn(b'Done.', out)


Expand Down

0 comments on commit 02f1385

Please sign in to comment.