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([], [])
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])