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):
12461246 self .assertIn ('sleep' , ns )
12471247
12481248 def test_recursion_direct (self ):
1249+ import sys
1250+ raise AssertionError ('Limit is' , sys .getrecursionlimit ())
12491251 e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
12501252 e .operand = e
1251- import sys
1252- raise ValueError ('Limit is' , sys .getrecursionlimit ())
12531253 with self .assertRaises (RecursionError ):
12541254 with support .infinite_recursion ():
12551255 compile (ast .Expression (e ), "<test>" , "eval" )
12561256
12571257 def test_recursion_indirect (self ):
1258+ import sys
1259+ raise AssertionError ('Limit is' , sys .getrecursionlimit ())
12581260 e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
12591261 f = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
12601262 e .operand = f
You can’t perform that action at this time.
0 commit comments