Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fd9c6a

Browse files
Rahul PatelSnShine
Rahul Patel
authored andcommitted
Added test in test_planning.py (aimacode#261)
Added test for spare_tire problem of planning module.
1 parent 04c7d51 commit 5fd9c6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_planning.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,15 @@ def test_air_cargo():
3434
p.act(action)
3535

3636
assert p.goal_test()
37+
38+
def test_spare_tire():
39+
p = spare_tire()
40+
assert p.goal_test() is False
41+
solution = [expr("Remove(Flat, Axle)"),
42+
expr("Remove(Spare, Trunk)"),
43+
expr("PutOn(Spare, Axle)")]
44+
45+
for action in solution:
46+
p.act(action)
47+
48+
assert p.goal_test()

0 commit comments

Comments
 (0)