https://github.com/python/cpython/commit/02f1385f8ad6bf45376377c41f106b386d3a7eb0
commit: 02f1385f8ad6bf45376377c41f106b386d3a7eb0
branch: main
author: Nice Zombies <[email protected]>
committer: AlexWaygood <[email protected]>
date: 2024-04-11T08:37:01+01:00
summary:

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

Co-authored-by: Alex Waygood <[email protected]>

files:
M Lib/test/test_exceptions.py

diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 36fd89dbb8896c..1224f143b5441f 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -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)
 
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to