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

Method test_prune

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

Source from the content-addressed store, hash-verified

265 print "pattern.graph.Graph.sorted()"
266
267 def test_prune(self):
268 # Assert leaf pruning.
269 g = self.g.copy()
270 g.prune(1)
271 self.assertEqual(len(g), 1)
272 self.assertEqual(g.nodes, [g["b"]])
273 print "pattern.graph.Graph.prune()"
274
275 def test_fringe(self):
276 # Assert leaf fetching.

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
pruneMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected