◐ Shell
clean mode source ↗

[3.10] bpo-11105: reduce the recursion limit for tests (GH-26550). by isidentical · Pull Request #26607 · python/cpython

Expand Up @@ -1101,15 +1101,17 @@ def test_recursion_direct(self): e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) e.operand = e with self.assertRaises(RecursionError): compile(ast.Expression(e), "<test>", "eval") with support.infinite_recursion(): compile(ast.Expression(e), "<test>", "eval")
def test_recursion_indirect(self): e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) e.operand = f f.operand = e with self.assertRaises(RecursionError): compile(ast.Expression(e), "<test>", "eval") with support.infinite_recursion(): compile(ast.Expression(e), "<test>", "eval")

class ASTValidatorTests(unittest.TestCase): Expand Down