Skip to content

Commit e754ad1

Browse files
committed
reset apla class for every tests
1 parent a79efac commit e754ad1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_search.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,31 @@
88
import coloredlogs
99
import sys
1010

11-
apla = AutomatedPlanner("pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl")
12-
1311

1412
def test_searchDFS():
13+
apla = AutomatedPlanner("pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl")
1514
dfs = DepthFirstSearch(apla)
1615
res = dfs.search()
1716
assert res[1] != 0 # Path, computation time, opened nodes
1817

1918

2019
def test_searchBFS():
20+
apla = AutomatedPlanner("pddl-examples/flip/domain.pddl", "pddl-examples/flip/problem.pddl")
2121
bfs = BreadthFirstSearch(apla)
2222
res = bfs.search() # Path, computation time, opened nodes
2323
assert res[1] != 0
2424

2525

2626
def test_searchDijkstra():
27+
apla = AutomatedPlanner("pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl")
2728
dijk = DijkstraBestFirstSearch(apla)
2829
res = dijk.search() # Goal, computation_time, opened_nodes(in this order)
2930
assert res[1] != 0 # Assert that it took some time to compute
3031
assert res[-1] > 0 # Assert that it visited some nodes
3132

3233

3334
def test_searchAStar():
35+
apla = AutomatedPlanner("pddl-examples/dinner/domain.pddl", "pddl-examples/dinner/problem.pddl")
3436
astar = AStarBestFirstSearch(apla, apla.available_heuristics["goal_count"])
3537
res = astar.search() # Goal, computation_time, opened_nodes(in this order)
3638
assert res[1] != 0 # Assert that it took time to compute

0 commit comments

Comments
 (0)