diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 27f91dbcd63aa5..f7847a35181ea3 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -1645,6 +1645,13 @@ def test_stack_3050(self): # This raised on 3.10.0 to 3.10.5 compile(code, "", "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, "", "single") + class TestStackSizeStability(unittest.TestCase): # Check that repeating certain snippets doesn't increase the stack size