Skip to content

Commit 8c5cd5a

Browse files
committed
Reduce size of compiler stress tests
1 parent 2dac9e6 commit 8c5cd5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/test/test_ast/test_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ def next(self):
992992
@skip_wasi_stack_overflow()
993993
@skip_emscripten_stack_overflow()
994994
def test_ast_recursion_limit(self):
995-
crash_depth = 500_000
995+
crash_depth = 100_000
996996
success_depth = 200
997997
if _testinternalcapi is not None:
998998
remaining = _testinternalcapi.get_c_recursion_remaining()

Lib/test/test_compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def test_yet_more_evil_still_undecodable(self):
728728
def test_compiler_recursion_limit(self):
729729
# Compiler frames are small
730730
limit = 100
731-
crash_depth = limit * 5000
731+
crash_depth = limit * 1000
732732
success_depth = limit
733733

734734
def check_limit(prefix, repeated, mode="single"):
@@ -1040,7 +1040,7 @@ def test_path_like_objects(self):
10401040
def test_stack_overflow(self):
10411041
# bpo-31113: Stack overflow when compile a long sequence of
10421042
# complex statements.
1043-
compile("if a: b\n" * 200000, "<dummy>", "exec")
1043+
compile("if a: b\n" * 100000, "<dummy>", "exec")
10441044

10451045
# Multiple users rely on the fact that CPython does not generate
10461046
# bytecode for dead code blocks. See bpo-37500 for more context.

0 commit comments

Comments
 (0)