(self)
| 127 | self.assertIsNone(ref()) |
| 128 | |
| 129 | def test_snippets(self): |
| 130 | for input, output, kind in ((exec_tests, exec_results, "exec"), |
| 131 | (single_tests, single_results, "single"), |
| 132 | (eval_tests, eval_results, "eval")): |
| 133 | for i, o in zip(input, output): |
| 134 | with self.subTest(action="parsing", input=i): |
| 135 | ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST) |
| 136 | self.assertEqual(to_tuple(ast_tree), o) |
| 137 | self._assertTrueorder(ast_tree, (0, 0)) |
| 138 | with self.subTest(action="compiling", input=i, kind=kind): |
| 139 | compile(ast_tree, "?", kind) |
| 140 | |
| 141 | def test_ast_validation(self): |
| 142 | # compile() is the only function that calls PyAST_Validate |
nothing calls this directly
no test coverage detected