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):
2186
2186
finally :
2187
2187
sys .setrecursionlimit (original_limit )
2188
2188
2189
- def infinite_recursion (max_depth = 75 ):
2189
+ def infinite_recursion (max_depth = 50 ):
2190
2190
"""Set a lower limit for tests that interact with infinite recursions
2191
2191
(e.g test_ast.ASTHelpers_Test.test_recursion_direct) since on some
2192
2192
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):
1246
1246
self .assertIn ('sleep' , ns )
1247
1247
1248
1248
def test_recursion_direct (self ):
1249
- import sys
1250
- raise AssertionError ('Limit is' , sys .getrecursionlimit ())
1251
1249
e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1252
1250
e .operand = e
1253
1251
with self .assertRaises (RecursionError ):
1254
1252
with support .infinite_recursion ():
1255
1253
compile (ast .Expression (e ), "<test>" , "eval" )
1256
1254
1257
1255
def test_recursion_indirect (self ):
1258
- import sys
1259
- raise AssertionError ('Limit is' , sys .getrecursionlimit ())
1260
1256
e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1261
1257
f = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1262
1258
e .operand = f
You can’t perform that action at this time.
0 commit comments