Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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, []))
Ejemplo n.º 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, []))
Ejemplo n.º 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, []))
Ejemplo n.º 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, []))