MCPcopy Index your code
hub / github.com/python/cpython / test_ast_validation

Method test_ast_validation

Lib/test/test_ast/test_ast.py:141–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

139 compile(ast_tree, "?", kind)
140
141 def test_ast_validation(self):
142 # compile() is the only function that calls PyAST_Validate
143 snippets_to_validate = exec_tests + single_tests + eval_tests
144 for snippet in snippets_to_validate:
145 tree = ast.parse(snippet, optimize=False)
146 compile(tree, '<string>', 'exec')
147
148 def test_parse_invalid_ast(self):
149 # see gh-130139

Callers

nothing calls this directly

Calls 2

compileFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected