File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments