def testRemoveMoreThanCurrent(self): state = game1.get_start_state() game1.modify_state(state, 'green', 0, 0, 'add_pill', 1) with self.assertRaises(Exception): game1.modify_state(state, 'green', 0, 0, 'remove_pill', 2)
def testModifyAdd(self): state = game1.get_start_state() game1.modify_state(state, 'green', 0, 0, 'add_pill', 1) self.assertEqual(state.days['green'][0][0], 1)
def testSameState(self): state = game1.get_start_state() game1.modify_state(state, 'green', 0, 0, 'add_pill', 1) game1.modify_state(state, 'green', 0, 0, 'remove_pill', 1) self.assertEqual( len(pyhop.pyhop(state, [('sort_meds', game1.get_goal())])), 13)