MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_repr

Method test_repr

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

Source from the content-addressed store, hash-verified

1054 self.assert_none_check(node, attr, source)
1055
1056 def test_repr(self) -> None:
1057 snapshots = AST_REPR_DATA_FILE.read_text().split("\n")
1058 for test, snapshot in zip(ast_repr_get_test_cases(), snapshots, strict=True):
1059 with self.subTest(test_input=test):
1060 self.assertEqual(repr(ast.parse(test)), snapshot)
1061
1062 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised
1063 def test_repr_large_input_crash(self):

Callers

nothing calls this directly

Calls 7

ast_repr_get_test_casesFunction · 0.85
reprFunction · 0.85
subTestMethod · 0.80
splitMethod · 0.45
read_textMethod · 0.45
assertEqualMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected