MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / test_copy

Method test_copy

tensorflow/python/autograph/pyct/anno_test.py:55–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 self.assertIsNone(anno.getanno(node, 'foo', default=None))
54
55 def test_copy(self):
56 node_1 = ast.Name()
57 anno.setanno(node_1, 'foo', 3)
58
59 node_2 = ast.Name()
60 anno.copyanno(node_1, node_2, 'foo')
61 anno.copyanno(node_1, node_2, 'bar')
62
63 self.assertTrue(anno.hasanno(node_2, 'foo'))
64 self.assertFalse(anno.hasanno(node_2, 'bar'))
65
66 def test_duplicate(self):
67 node = ast.If(

Callers

nothing calls this directly

Calls 1

NameMethod · 0.45

Tested by

no test coverage detected