Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reduce size of compiler stress tests
  • Loading branch information
mhsmith committed Dec 4, 2025
commit 8c5cd5a41a4916a552cddee8ebce89f8eb25fbb7
2 changes: 1 addition & 1 deletion Lib/test/test_ast/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ def next(self):
@skip_wasi_stack_overflow()
@skip_emscripten_stack_overflow()
def test_ast_recursion_limit(self):
crash_depth = 500_000
crash_depth = 100_000
success_depth = 200
if _testinternalcapi is not None:
remaining = _testinternalcapi.get_c_recursion_remaining()
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def test_yet_more_evil_still_undecodable(self):
def test_compiler_recursion_limit(self):
# Compiler frames are small
limit = 100
crash_depth = limit * 5000
crash_depth = limit * 1000
success_depth = limit

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

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