Skip to content

Commit

Permalink
pythongh-94445: add compiler test for another case of excessive stack…
Browse files Browse the repository at this point in the history
… use (pythonGH-99237)
  • Loading branch information
carljm committed Nov 8, 2022
1 parent 0b4ffb0 commit 027bc7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,13 @@ def test_stack_3050(self):
# 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
Expand Down

0 comments on commit 027bc7e

Please sign in to comment.