pypy/module/_ast/test/test_ast.py::AppTestAST::()::test_functiondef
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x7f5548ecb850>
def test_functiondef(self):
import ast as ast_utils
import _ast as ast
fAst = ast.FunctionDef(
name="foo",
args=ast.arguments(
args=[], vararg=None, kwarg=None, defaults=[],
kwonlyargs=[], kw_defaults=[], posonlyargs=[]),
body=[ast.Expr(ast.Constant('docstring', None))],
decorator_list=[], lineno=5, col_offset=0)
exprAst = ast.Interactive(body=[fAst])
ast_utils.fix_missing_locations(exprAst)
> compiled = compile(exprAst, "<foo>", "single")
E (application-level) TypeError: required field 'type_params' missing from FunctionDef
[/build_dir/own-linux-x86-64/build/pypy/module/_ast/test/test_ast.py:349]:13: TypeError
builder: own-linux-x86-64 build #10880+
test: pypy/module/_ast/test/test_ast.py::AppTestAST::()::test_functiondef