diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-04-11 07:37:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 07:37:01 (GMT) |
commit | 02f1385f8ad6bf45376377c41f106b386d3a7eb0 (patch) | |
tree | d17f60982a15b4d54d83649c14675c0396131786 | |
parent | 993c3cca16ed00a0bfe467f7f26ac4f5f6dfb24c (diff) | |
download | cpython-02f1385f8ad6bf45376377c41f106b386d3a7eb0.zip cpython-02f1385f8ad6bf45376377c41f106b386d3a7eb0.tar.gz cpython-02f1385f8ad6bf45376377c41f106b386d3a7eb0.tar.bz2 |
gh-117606: Truncate extremely long error message in `test_exceptions` (#117670)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-rw-r--r-- | Lib/test/test_exceptions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 36fd89d..1224f14 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -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) |