diff options
author | Carl Meyer <carl@oddbird.net> | 2022-11-08 20:39:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 20:39:32 (GMT) |
commit | 027bc7e6bba93777c80300953579266818d339e7 (patch) | |
tree | 32f34b911e6a9763ab66a12c8fb95f9bb64d6bb3 /Lib/test/test_compile.py | |
parent | 0b4ffb08ccdc21fc07ce90d3f78b58a25e1af653 (diff) | |
download | cpython-027bc7e6bba93777c80300953579266818d339e7.zip cpython-027bc7e6bba93777c80300953579266818d339e7.tar.gz cpython-027bc7e6bba93777c80300953579266818d339e7.tar.bz2 |
gh-94445: add compiler test for another case of excessive stack use (GH-99237)
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 27f91db..f7847a3 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -1645,6 +1645,13 @@ class TestExpressionStackSize(unittest.TestCase): # This raised on 3.10.0 to 3.10.5 compile(code, "<foo>", "single") + def test_stack_3050_2(self): + M = 3050 + args = ", ".join(f"arg{i}:type{i}" for i in range(M)) + code = f"def f({args}):\n pass" + # This raised on 3.10.0 to 3.10.5 + compile(code, "<foo>", "single") + class TestStackSizeStability(unittest.TestCase): # Check that repeating certain snippets doesn't increase the stack size |