示例#1
0
def test_ordered_node_weighted_astar4():
    h_val = h4(root4)
    assert a_star.ordered_node_weighted_astar(5)(root4, h_val, 0) == (75, 15,
                                                                      0, root4)
示例#2
0
def test_ordered_node_weighted_astar2():
    h_val = h2(root2)
    actual = a_star.ordered_node_weighted_astar(5)(root2, h_val, 0)
    assert actual == (25, 5, 0, root2)
示例#3
0
def test_ordered_node_weighted_astar3():
    h_val = h3(root3)
    actual = a_star.ordered_node_weighted_astar(5)(root3, h_val, 0)
    assert actual == (20, 4, 0, root3)
示例#4
0
def test_ordered_node_weighted_astar1():
    h_val = h1(root1)
    actual = a_star.ordered_node_weighted_astar(5)(root1, h_val, 0)
    assert actual == (0, 0, 0, root1)
示例#5
0
def test_ordered_node_weighted_astar4():
    h_val = h4(root4)
    assert a_star.ordered_node_weighted_astar(5)(root4, h_val,
                                                 0) == (75, 15, 0, root4)
示例#6
0
def test_ordered_node_weighted_astar3():
    h_val = h3(root3)
    actual = a_star.ordered_node_weighted_astar(5)(root3, h_val, 0)
    assert actual == (20, 4, 0, root3)
示例#7
0
def test_ordered_node_weighted_astar2():
    h_val = h2(root2)
    actual = a_star.ordered_node_weighted_astar(5)(root2, h_val, 0)
    assert actual == (25, 5, 0, root2)
示例#8
0
def test_ordered_node_weighted_astar1():
    h_val = h1(root1)
    actual = a_star.ordered_node_weighted_astar(5)(root1, h_val, 0)
    assert actual == (0, 0, 0, root1)