Ejemplo n.º 1
0
 def test_del_vertex(self):
     g = Graph([v, w, x], [vw, vx, wx])
     g.del_vertex(x)
     assert g == Graph([v, w], [vw])
     g.del_vertex(v)
     assert g == Graph([w, ], [])
     g.del_vertex(w)
     assert g == Graph([], [])
Ejemplo n.º 2
0
 def test_del_vertex_notthere(self):
     g = Graph([v, w, x], [vw, vx, wx])
     g.del_vertex(y)
     assert g == Graph([v, w, x], [vw, vx, wx])