mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-91079: Decouple C stack overflow checks from Python recursion checks. (GH-96510)
This commit is contained in:
parent
0ff8fd6583
commit
76449350b3
22 changed files with 165 additions and 99 deletions
|
@ -825,9 +825,9 @@ class AST_Tests(unittest.TestCase):
|
|||
|
||||
@support.cpython_only
|
||||
def test_ast_recursion_limit(self):
|
||||
fail_depth = sys.getrecursionlimit() * 3
|
||||
crash_depth = sys.getrecursionlimit() * 300
|
||||
success_depth = int(fail_depth * 0.75)
|
||||
fail_depth = support.EXCEEDS_RECURSION_LIMIT
|
||||
crash_depth = 100_000
|
||||
success_depth = 1200
|
||||
|
||||
def check_limit(prefix, repeated):
|
||||
expect_ok = prefix + repeated * success_depth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue