We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f59bdae commit 17afd1eCopy full SHA for 17afd1e
1 file changed
tests/test_search.py
@@ -26,12 +26,12 @@ def test_searchBFS():
26
def test_searchDijkstra():
27
dijk = DijkstraBestFirstSearch(apla)
28
res = dijk.search() # Goal, computation_time, opened_nodes(in this order)
29
- assert res[1] != 0
30
- #assert res[-1] >= 1
+ assert res[1] != 0 # Assert that it took some time to compute
+ assert res[-1] > 0 # Assert that it visited some nodes
31
32
33
def test_searchAStar():
34
astar = AStarBestFirstSearch(apla, apla.available_heuristics["goal_count"])
35
res = astar.search() # Goal, computation_time, opened_nodes(in this order)
36
37
+ assert res[1] != 0 # Assert that it took time to compute
+ assert res[-1] > 0 # Assert that it visited at least one node
0 commit comments