Example #1
0
def test_del_edge():
    graph = DirectedGraph({1: [2]})
    assert graph.is_edge(1, 2)
    graph.del_edge(1, 2)
    assert not graph.is_edge(1, 2)

    graph = DirectedGraph({1: [2, 2]})
    assert graph.is_edge(1, 2)
    graph.del_edge(1, 2)
    assert graph.is_edge(1, 2)
    graph.del_edge(1, 2)
    assert not graph.is_edge(1, 2)
Example #2
0
 def test_del_edge(self):
     d = DirectedGraph({1: [2]})
     self.assertTrue(d.is_edge(1, 2))
     d.del_edge(1, 2)
     self.assertFalse(d.is_edge(1, 2))