mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-94445: add compiler test for another case of excessive stack use (GH-99237)
This commit is contained in:
parent
0b4ffb08cc
commit
027bc7e6bb
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue