File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1246,15 +1246,17 @@ 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 ())
1249
1251
e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1250
1252
e .operand = e
1251
- import sys
1252
- raise ValueError ('Limit is' , sys .getrecursionlimit ())
1253
1253
with self .assertRaises (RecursionError ):
1254
1254
with support .infinite_recursion ():
1255
1255
compile (ast .Expression (e ), "<test>" , "eval" )
1256
1256
1257
1257
def test_recursion_indirect (self ):
1258
+ import sys
1259
+ raise AssertionError ('Limit is' , sys .getrecursionlimit ())
1258
1260
e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1259
1261
f = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
1260
1262
e .operand = f
You can’t perform that action at this time.
0 commit comments