mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[3.13] gh-141794: Reduce size of compiler stress tests to fix Android warnings (GH-142263) (#142409)
(cherry picked from commit f193c8fe9e)
This commit is contained in:
parent
a12841c197
commit
2ef7698127
1 changed files with 5 additions and 3 deletions
|
|
@ -993,11 +993,13 @@ def test_path_like_objects(self):
|
|||
# An implicit test for PyUnicode_FSDecoder().
|
||||
compile("42", FakePath("test_compile_pathlike"), "single")
|
||||
|
||||
# bpo-31113: Stack overflow when compile a long sequence of
|
||||
# complex statements.
|
||||
@support.requires_resource('cpu')
|
||||
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")
|
||||
# Android test devices have less memory.
|
||||
size = 100_000 if sys.platform == "android" else 200_000
|
||||
compile("if a: b\n" * size, "<dummy>", "exec")
|
||||
|
||||
# Multiple users rely on the fact that CPython does not generate
|
||||
# bytecode for dead code blocks. See bpo-37500 for more context.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue