File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -747,7 +747,6 @@ def next(self):
747747 @support .cpython_only
748748 @skip_emscripten_stack_overflow ()
749749 def test_ast_recursion_limit (self ):
750- fail_depth = 100_000
751750 crash_depth = 200_000
752751 success_depth = 200
753752 if _testinternalcapi is not None :
@@ -757,13 +756,13 @@ def test_ast_recursion_limit(self):
757756 def check_limit (prefix , repeated ):
758757 expect_ok = prefix + repeated * success_depth
759758 ast .parse (expect_ok )
760- for depth in ( fail_depth , crash_depth ):
761- broken = prefix + repeated * depth
762- details = "Compiling ({!r} + {!r} * {})" .format (
763- prefix , repeated , depth )
764- with self .assertRaises (RecursionError , msg = details ):
765- with support .infinite_recursion ():
766- ast .parse (broken )
759+
760+ broken = prefix + repeated * crash_depth
761+ details = "Compiling ({!r} + {!r} * {})" .format (
762+ prefix , repeated , crash_depth )
763+ with self .assertRaises (RecursionError , msg = details ):
764+ with support .infinite_recursion ():
765+ ast .parse (broken )
767766
768767 check_limit ("a" , "()" )
769768 check_limit ("a" , ".b" )
You can’t perform that action at this time.
0 commit comments