Пример #1
0
 def test_achieve_all(self):
     current = ['hand empty', 'arm down']
     goals = ['satisfied', 'baseball in air']
     expected = [
         'satisfied', 'arm down', 'baseball in air', 'grabbing baseball',
         'raising arm', 'throwing baseball', 'drinking beer'
     ]
     final = gps.achieve_all(current, ops, goals, [])
     self.assertEqual(set(expected), set(final))
Пример #2
0
 def test_achieve_all(self):
     current = ['hand empty', 'arm down']
     goals = ['satisfied', 'baseball in air']
     expected = ['satisfied',
                 'arm down',
                 'baseball in air',
                 'grabbing baseball',
                 'raising arm',
                 'throwing baseball',
                 'drinking beer']
     final = gps.achieve_all(current, ops, goals, [])
     self.assertEqual(set(expected), set(final))
Пример #3
0
 def test_achieve_all_clobbers_sibling(self):
     current = ['hand empty', 'arm down']
     goals = ['baseball in air', 'satisfied']
     self.assertFalse(gps.achieve_all(current, ops, goals, []))
Пример #4
0
 def test_achieve_all_one_impossible(self):
     current = ['hand empty', 'arm down']
     goals = ['satisfied', 'baseball in air', 'awesome']
     self.assertFalse(gps.achieve_all(current, ops, goals, []))
Пример #5
0
 def test_achieve_all_clobbers_sibling(self):
     current = ['hand empty', 'arm down']
     goals = ['baseball in air', 'satisfied']
     self.assertFalse(gps.achieve_all(current, ops, goals, []))
Пример #6
0
 def test_achieve_all_one_impossible(self):
     current = ['hand empty', 'arm down']
     goals = ['satisfied', 'baseball in air', 'awesome']
     self.assertFalse(gps.achieve_all(current, ops, goals, []))