Beispiel #1
0
def test_get_unvisited_neighbor__none_available():
    start_v = Vertex('1')
    end_v = Vertex('2')
    start_v.connect(end_vertex=end_v)

    end_v.visited = True
    assert start_v.get_unvisited_neighbor() is None
Beispiel #2
0
def test_get_unvisited_neighbor__valid_result():
    start_v = Vertex('1')
    end_v = Vertex('2')
    start_v.connect(end_vertex=end_v)

    result = start_v.get_unvisited_neighbor()
    assert result == end_v