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

Method test_cut

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

Source from the content-addressed store, hash-verified

632 print "pattern.graph.redirect()"
633
634 def test_cut(self):
635 # Assert unlink Node(b) and redirect a->c and a->d.
636 g = graph.Graph()
637 g.add_edge("a", "b")
638 g.add_edge("b", "c")
639 g.add_edge("b", "d")
640 graph.cut(g, g["b"])
641 self.assertTrue(len(g["b"].edges) == 0)
642 self.assertTrue(g.edge("a","c") is not None)
643 self.assertTrue(g.edge("a","d") is not None)
644 print "pattern.graph.cut()"
645
646 def test_insert(self):
647 g = graph.Graph()

Callers

nothing calls this directly

Calls 3

add_edgeMethod · 0.95
edgeMethod · 0.95
lenFunction · 0.85

Tested by

no test coverage detected