예제 #1
0
def test_initial_fscore_sets_infinity_for_all_except_start_node(map_40):
    planner = PathPlanner(map_40, 1, 39)
    f_score = planner.create_fScore()
    for score in f_score:
        if score != 1:
            assert f_score[score] == math.inf
예제 #2
0
def test_initial_fscore_sets_zero_for_start_node(map_40):
    planner = PathPlanner(map_40, 3, 11)
    f_score = planner.create_fScore()
    assert 0 == f_score[3]