summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-02 02:06:07 (GMT)
committerGitHub <noreply@github.com>2023-06-02 02:06:07 (GMT)
commite6d5e63614684025d4aa09f77a759eb3fc0bd77f (patch)
tree3c4db01fce54a0c8269c6b380af07704fd3e1d44 /Lib
parentd57ee813ebd496a3fd8118d7dc057d54c4af847e (diff)
downloadcpython-e6d5e63614684025d4aa09f77a759eb3fc0bd77f.zip
cpython-e6d5e63614684025d4aa09f77a759eb3fc0bd77f.tar.gz
cpython-e6d5e63614684025d4aa09f77a759eb3fc0bd77f.tar.bz2
[3.12] gh-104799: Default missing lists in AST to the empty list (GH-104834) (#105213)
(cherry picked from commit 77d25795862f19c6e3d647b76cfb10d5ce1f149c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ast.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 76edbf5..ffd082e 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -1591,6 +1591,8 @@ class ASTValidatorTests(unittest.TestCase):
f = ast.FunctionDef("x", a, [ast.Pass()], [],
ast.Name("x", ast.Store()), None, [])
self.stmt(f, "must have Load context")
+ f = ast.FunctionDef("x", ast.arguments(), [ast.Pass()])
+ self.stmt(f)
def fac(args):
return ast.FunctionDef("x", args, [ast.Pass()], [], None, None, [])
self._check_arguments(fac, self.stmt)