File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414def test_searchDFS ():
1515 dfs = DepthFirstSearch (apla )
16- _ , ct = dfs .search ()
17- assert ct != 0
16+ res = dfs .search ()
17+ assert res [ 1 ] != 0 # Path, computation time, opened nodes
1818
1919
2020def test_searchBFS ():
2121 bfs = BreadthFirstSearch (apla )
22- _ , ct = bfs .search ()
23- assert ct != 0
22+ res = bfs .search () # Path, computation time, opened nodes
23+ assert res [ 1 ] != 0
2424
2525
2626def test_searchDijkstra ():
2727 dijk = DijkstraBestFirstSearch (apla )
28- res = dijk .search () # None , computation_time, opened_nodes(in this order)
28+ res = dijk .search () # Goal , computation_time, opened_nodes(in this order)
2929 assert res [1 ] != 0
30- assert res [- 1 ] >= 1
30+ # assert res[-1] >= 1
3131
3232
3333def test_searchAStar ():
34- astar = AStarBestFirstSearch (apla , goal_count_heuristic )
35- res = astar .search () # None , computation_time, opened_nodes(in this order)
34+ astar = AStarBestFirstSearch (apla , apla . available_heuristics [ "goal_count" ] )
35+ res = astar .search () # Goal , computation_time, opened_nodes(in this order)
3636 assert res [1 ] != 0
37- assert res [- 1 ] >= 1
37+ # assert res[-1] >= 1
You can’t perform that action at this time.
0 commit comments