Пример #1
0
def test_island_empty():
    graph = Graph()
    lonely = graph.add_node("lonely")
    actual = graph.depth_first_search(lonely)
    expected = ["lonely"]
    assert actual == expected
Пример #2
0
def test_empty():
    graph = Graph()
    node = Vertex("some other node")
    actual = graph.depth_first_search(node)
    expected = []
    assert actual == expected