From 1ee93c0e1bf9be328fe1889202ba222bccfd15bc Mon Sep 17 00:00:00 2001 From: Rahul Patel Date: Wed, 14 Sep 2016 08:57:24 +0530 Subject: [PATCH] Added test in test_planning.py Added test for spare_tire problem of planning module. --- tests/test_planning.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_planning.py b/tests/test_planning.py index e90601a6f..739324256 100644 --- a/tests/test_planning.py +++ b/tests/test_planning.py @@ -34,3 +34,15 @@ def test_air_cargo(): p.act(action) assert p.goal_test() + +def test_spare_tire(): + p = spare_tire() + assert p.goal_test() is False + solution = [expr("Remove(Flat, Axle)"), + expr("Remove(Spare, Trunk)"), + expr("PutOn(Spare, Axle)")] + + for action in solution: + p.act(action) + + assert p.goal_test()