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

Method test_flatten

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

Source from the content-addressed store, hash-verified

99 print "pattern.graph.Node.edges"
100
101 def test_flatten(self):
102 # Assert node spreading activation.
103 n = self.g["a"]
104 self.assertTrue(set(n.flatten(depth=0)) == set([n]))
105 self.assertTrue(set(n.flatten(depth=1)) == set([n, n.links[0]]))
106 self.assertTrue(set(n.flatten(depth=2)) == set(self.g.nodes))
107 print "pattern.graph.Node.flatten()"
108
109 def test_text(self):
110 n = self.g.add_node("d", text=None)

Callers

nothing calls this directly

Calls 1

flattenMethod · 0.45

Tested by

no test coverage detected