@@ -714,19 +714,17 @@ def test_yet_more_evil_still_undecodable(self):
714714 def test_compiler_recursion_limit (self ):
715715 # Compiler frames are small
716716 limit = 100
717- fail_depth = limit * 1500
718717 crash_depth = limit * 5000
719718 success_depth = limit
720719
721720 def check_limit (prefix , repeated , mode = "single" ):
722721 expect_ok = prefix + repeated * success_depth
723722 compile (expect_ok , '<test>' , mode )
724- for depth in (fail_depth , crash_depth ):
725- broken = prefix + repeated * depth
726- details = "Compiling ({!r} + {!r} * {})" .format (
727- prefix , repeated , depth )
728- with self .assertRaises (RecursionError , msg = details ):
729- compile (broken , '<test>' , mode )
723+ broken = prefix + repeated * crash_depth
724+ details = "Compiling ({!r} + {!r} * {})" .format (
725+ prefix , repeated , crash_depth )
726+ with self .assertRaises (RecursionError , msg = details ):
727+ compile (broken , '<test>' , mode )
730728
731729 check_limit ("a" , "()" )
732730 check_limit ("a" , ".b" )
0 commit comments