Skip to content

Commit 4f97b61

Browse files
committed
Testing
1 parent 209890e commit 4f97b61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_ast.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)