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

Method test_parse_lambda

dali/test/python/autograph/pyct/test_parser.py:51–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 self.assertEqual("f", node.name)
50
51 def test_parse_lambda(self):
52 l = lambda x: x + 1
53 expected_node_src = "lambda x: (x + 1)"
54
55 node, source = parser.parse_entity(l, future_features=())
56 self.assertAstMatches(node, source)
57 self.assertAstMatches(node, expected_node_src)
58
59 def test_parse_lambda_prefix_cleanup(self):
60 lambda_lam = lambda x: x + 1

Callers

nothing calls this directly

Calls 1

assertAstMatchesMethod · 0.95

Tested by

no test coverage detected