MCPcopy Create free account
hub / github.com/NVIDIA/DALI / assertAstMatches

Method assertAstMatches

dali/test/python/autograph/pyct/test_loader.py:34–40  ·  view source on GitHub ↗
(self, actual_node, expected_node_src)

Source from the content-addressed store, hash-verified

32
33class LoaderTest(unittest.TestCase):
34 def assertAstMatches(self, actual_node, expected_node_src):
35 expected_node = gast.parse(expected_node_src).body[0]
36
37 msg = "AST did not match expected:\n{}\nActual:\n{}".format(
38 pretty_printer.fmt(expected_node), pretty_printer.fmt(actual_node)
39 )
40 self.assertTrue(ast_util.matches(actual_node, expected_node), msg)
41
42 def test_parse_load_identity(self):
43 def test_fn(x):

Callers 2

test_load_astMethod · 0.95

Calls 2

parseMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected