コード例 #1
0
ファイル: test_gps.py プロジェクト: JChungYS/learnpy
 def test_apply_operator_preconds_satisfied(self):
     current = ['have baseball', 'arm up', 'have food']
     expected = [
         'arm down', 'baseball in air', 'have food', 'throwing baseball'
     ]
     goal = 'baseball in air'
     final = gps.apply_operator(throw, current, ops, goal, [])
     self.assertEqual(set(final), set(expected))
コード例 #2
0
ファイル: test_gps.py プロジェクト: JChungYS/learnpy
 def test_apply_operator_recurse(self):
     current = ['hand empty', 'arm down', 'have food']
     expected = [
         'arm down', 'baseball in air', 'have food', 'grabbing baseball',
         'raising arm', 'throwing baseball'
     ]
     goal = 'baseball in air'
     final = gps.apply_operator(throw, current, ops, goal, [])
     self.assertEqual(set(final), set(expected))
コード例 #3
0
ファイル: test_gps.py プロジェクト: JoeyDHiggins/paip-python
 def test_apply_operator_preconds_satisfied(self):
     current = ['have baseball', 'arm up', 'have food']
     expected = ['arm down',
                 'baseball in air',
                 'have food',
                 'throwing baseball']
     goal = 'baseball in air'
     final = gps.apply_operator(throw, current, ops, goal, [])
     self.assertEqual(set(final), set(expected))
コード例 #4
0
ファイル: test_gps.py プロジェクト: JoeyDHiggins/paip-python
 def test_apply_operator_recurse(self):
     current = ['hand empty', 'arm down', 'have food']
     expected = ['arm down',
                 'baseball in air',
                 'have food',
                 'grabbing baseball',
                 'raising arm',
                 'throwing baseball']
     goal = 'baseball in air'
     final = gps.apply_operator(throw, current, ops, goal, [])
     self.assertEqual(set(final), set(expected))
コード例 #5
0
ファイル: test_gps.py プロジェクト: JChungYS/learnpy
 def test_apply_operator_recurse_fail(self):
     current = ['hand empty', 'have food', 'arm up']
     goal = 'baseball in air'
     self.assertFalse(gps.apply_operator(throw, current, ops, goal, []))
コード例 #6
0
ファイル: test_gps.py プロジェクト: JoeyDHiggins/paip-python
 def test_apply_operator_recurse_fail(self):
     current = ['hand empty', 'have food', 'arm up']
     goal = 'baseball in air'
     self.assertFalse(gps.apply_operator(throw, current, ops, goal, []))