gh-117606: Truncate extremely long error message in test_exceptions (#117670)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Nice Zombies 2024-04-11 09:37:01 +02:00 committed by GitHub
parent 993c3cca16
commit 02f1385f8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1451,7 +1451,8 @@ class ExceptionTests(unittest.TestCase):
"""
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)