MCPcopy Index your code
hub / github.com/clips/pattern / test_edge

Method test_edge

test/test_graph.py:88–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 print "pattern.graph.Node"
87
88 def test_edge(self):
89 # Assert node edges.
90 n1 = self.g["a"]
91 n2 = self.g["b"]
92 self.assertTrue(n1.edges[0].node1.id == "a")
93 self.assertTrue(n1.edges[0].node2.id == "b")
94 self.assertTrue(n1.links[0].id == "b")
95 self.assertTrue(n1.links[0] == self.g.edges[0].node2)
96 self.assertTrue(n1.links.edge("b") == self.g.edges[0])
97 self.assertTrue(n1.links.edge(n2) == self.g.edges[0])
98 print "pattern.graph.Node.links"
99 print "pattern.graph.Node.edges"
100
101 def test_flatten(self):
102 # Assert node spreading activation.

Callers

nothing calls this directly

Calls 1

edgeMethod · 0.45

Tested by

no test coverage detected