mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] GH-112215: Backport C recursion changes (GH-115083)
This commit is contained in:
parent
a30bb080dc
commit
4d87832d87
14 changed files with 65 additions and 46 deletions
|
@ -607,9 +607,9 @@ class TestSpecifics(unittest.TestCase):
|
|||
# Expected limit is C_RECURSION_LIMIT * 2
|
||||
# Duplicating the limit here is a little ugly.
|
||||
# Perhaps it should be exposed somewhere...
|
||||
fail_depth = C_RECURSION_LIMIT * 2 + 1
|
||||
fail_depth = C_RECURSION_LIMIT + 1
|
||||
crash_depth = C_RECURSION_LIMIT * 100
|
||||
success_depth = int(C_RECURSION_LIMIT * 1.8)
|
||||
success_depth = int(C_RECURSION_LIMIT * 0.9)
|
||||
|
||||
def check_limit(prefix, repeated, mode="single"):
|
||||
expect_ok = prefix + repeated * success_depth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue