Exemplo n.º 1
0
 def test_remove_out_edge(self):
     edge = Mock()
     vertex = BaseVertex('spam')
     vertex.add_out_edge(edge)
     vertex.remove_out_edge(edge)
     self.assertFalse(vertex._out_edges)
     self.assertFalse(vertex.edges)
Exemplo n.º 2
0
 def test_add_out_edge(self):
     vertex = BaseVertex('spam')
     edge = Mock()
     vertex.add_out_edge(edge)
     self.assertTrue(edge in vertex._out_edges)
     self.assertTrue(edge in vertex.edges)