diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 23f84b48fac830..54e90663ab5100 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -1394,6 +1394,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