aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-02-25 09:24:48 +0000
committerGitHub <noreply@github.com>2025-02-25 09:24:48 +0000
commit014223649c33b2febbccfa221c2ab7f18a8c0847 (patch)
tree5fb6432982ab3085d9275f20769f8fbcc581666b /Lib/test/test_exceptions.py
parent99088ab081279329b8362e1c24533fa0be303e6f (diff)
downloadcpython-014223649c33b2febbccfa221c2ab7f18a8c0847.tar.gz
cpython-014223649c33b2febbccfa221c2ab7f18a8c0847.zip
GH-130396: Use computed stack limits on linux (GH-130398)
* Implement C recursion protection with limit pointers for Linux, MacOS and Windows * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 7aa200ad8be..bf0bc53b634 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -1391,7 +1391,7 @@ class ExceptionTests(unittest.TestCase):
self.assertIsInstance(exc, RecursionError, type(exc))
self.assertIn("maximum recursion depth exceeded", str(exc))
-
+ @support.skip_wasi_stack_overflow()
@cpython_only
@support.requires_resource('cpu')
def test_trashcan_recursion(self):
@@ -1479,7 +1479,7 @@ class ExceptionTests(unittest.TestCase):
"""
rc, out, err = script_helper.assert_python_failure("-c", code)
self.assertEqual(rc, 1)
- expected = b'RecursionError: maximum recursion depth exceeded'
+ expected = b'RecursionError'
self.assertTrue(expected in err, msg=f"{expected!r} not found in {err[:3_000]!r}... (truncated)")
self.assertIn(b'Done.', out)