summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2023-06-02 01:39:39 (GMT)
committerGitHub <noreply@github.com>2023-06-02 01:39:39 (GMT)
commit77d25795862f19c6e3d647b76cfb10d5ce1f149c (patch)
tree65312bb62cd0635d25b7ff257565afeb7af470c0 /Lib
parent37498fc95012ba8e147db646b841bc3d36ddf4af (diff)
downloadcpython-77d25795862f19c6e3d647b76cfb10d5ce1f149c.zip
cpython-77d25795862f19c6e3d647b76cfb10d5ce1f149c.tar.gz
cpython-77d25795862f19c6e3d647b76cfb10d5ce1f149c.tar.bz2
gh-104799: Default missing lists in AST to the empty list (#104834)
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)