Skip to content

Commit 7c4d9ad

Browse files
committed
Fix test_recursion_direct failure on Windows buildbot
1 parent 2d52406 commit 7c4d9ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_ast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ def test_recursion_direct(self):
12491249
e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
12501250
e.operand = e
12511251
with self.assertRaises(RecursionError):
1252-
with support.infinite_recursion():
1252+
with support.infinite_recursion(max_depth=30):
12531253
compile(ast.Expression(e), "<test>", "eval")
12541254

12551255
def test_recursion_indirect(self):
@@ -1258,7 +1258,7 @@ def test_recursion_indirect(self):
12581258
e.operand = f
12591259
f.operand = e
12601260
with self.assertRaises(RecursionError):
1261-
with support.infinite_recursion():
1261+
with support.infinite_recursion(max_depth=30):
12621262
compile(ast.Expression(e), "<test>", "eval")
12631263

12641264

0 commit comments

Comments
 (0)