|
14 | 14 | def test_searchDFS(): |
15 | 15 | dfs = DepthFirstSearch(apla) |
16 | 16 | res = dfs.search() |
17 | | - assert res[1] != 0 # Path, computation time, opened nodes |
| 17 | + assert res[1] != 0 # Path, computation time, opened nodes |
18 | 18 |
|
19 | 19 |
|
20 | 20 | def test_searchBFS(): |
21 | 21 | bfs = BreadthFirstSearch(apla) |
22 | | - res = bfs.search() # Path, computation time, opened nodes |
| 22 | + res = bfs.search() # Path, computation time, opened nodes |
23 | 23 | assert res[1] != 0 |
24 | 24 |
|
25 | 25 |
|
26 | 26 | def test_searchDijkstra(): |
27 | 27 | dijk = DijkstraBestFirstSearch(apla) |
28 | | - res = dijk.search() # Goal, computation_time, opened_nodes(in this order) |
29 | | - assert res[1] != 0 # Assert that it took some time to compute |
30 | | - assert res[-1] > 0 # Assert that it visited some nodes |
| 28 | + res = dijk.search() # Goal, computation_time, opened_nodes(in this order) |
| 29 | + assert res[1] != 0 # Assert that it took some time to compute |
| 30 | + assert res[-1] > 0 # Assert that it visited some nodes |
31 | 31 |
|
32 | 32 |
|
33 | 33 | def test_searchAStar(): |
34 | 34 | astar = AStarBestFirstSearch(apla, apla.available_heuristics["goal_count"]) |
35 | | - res = astar.search() # Goal, computation_time, opened_nodes(in this order) |
36 | | - assert res[1] != 0 # Assert that it took time to compute |
37 | | - assert res[-1] > 0 # Assert that it visited at least one node |
| 35 | + res = astar.search() # Goal, computation_time, opened_nodes(in this order) |
| 36 | + assert res[1] != 0 # Assert that it took time to compute |
| 37 | + assert res[-1] > 0 # Assert that it visited at least one node |
0 commit comments