Skip to content

Commit 9383ef3

Browse files
authored
Merge pull request #78 from APLA-Toolbox/fix-tests
Fix pddl path in test
2 parents 4ef0234 + e754ad1 commit 9383ef3

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,4 @@ logs/*
134134
!logs/.gitkeep
135135
data.json
136136
pddl-examples/*
137+
data/*

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("data/domain.pddl", "data/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)