def test_delete(self):
        vertex1 = Vertex(1)
        vertex2 = Vertex(2)

        edge = Edge(vertex1, vertex2, 3)
        edge.delete()

        self.assertNotIn(edge, vertex1.edges)
        self.assertNotIn(edge, vertex2.edges)
Exemplo n.º 2
0
 def deleteEdge(self, edge: Edge):
     self.edges.remove(edge)
     edge.delete()