@@ -714,19 +714,17 @@ def test_yet_more_evil_still_undecodable(self):
714
714
def test_compiler_recursion_limit (self ):
715
715
# Compiler frames are small
716
716
limit = 100
717
- fail_depth = limit * 1500
718
717
crash_depth = limit * 5000
719
718
success_depth = limit
720
719
721
720
def check_limit (prefix , repeated , mode = "single" ):
722
721
expect_ok = prefix + repeated * success_depth
723
722
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 )
730
728
731
729
check_limit ("a" , "()" )
732
730
check_limit ("a" , ".b" )
0 commit comments