Skip to content

Commit 9ee46c2

Browse files
committed
Try lowering the limit
1 parent 4f97b61 commit 9ee46c2

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Lib/test/support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,7 @@ def set_recursion_limit(limit):
21862186
finally:
21872187
sys.setrecursionlimit(original_limit)
21882188

2189-
def infinite_recursion(max_depth=75):
2189+
def infinite_recursion(max_depth=50):
21902190
"""Set a lower limit for tests that interact with infinite recursions
21912191
(e.g test_ast.ASTHelpers_Test.test_recursion_direct) since on some
21922192
debug windows builds, due to not enough functions being inlined the

Lib/test/test_ast.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,17 +1246,13 @@ def test_level_as_none(self):
12461246
self.assertIn('sleep', ns)
12471247

12481248
def test_recursion_direct(self):
1249-
import sys
1250-
raise AssertionError('Limit is', sys.getrecursionlimit())
12511249
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
12521250
e.operand = e
12531251
with self.assertRaises(RecursionError):
12541252
with support.infinite_recursion():
12551253
compile(ast.Expression(e), "<test>", "eval")
12561254

12571255
def test_recursion_indirect(self):
1258-
import sys
1259-
raise AssertionError('Limit is', sys.getrecursionlimit())
12601256
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
12611257
f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
12621258
e.operand = f

0 commit comments

Comments
 (0)