예제 #1
0
 def test_unidirectional(self):
     a = actuators.UnidirectionalActuator()
     self.assertEqual(a.next_move(), constants.RIGHT)
     a = actuators.UnidirectionalActuator(direction=None)
     self.assertEqual(a.next_move(), constants.RIGHT)
     data = a.serialize()
     self.assertIsNotNone(data)
     self.assertEqual(data["direction"], constants.RIGHT)
     al = actuators.UnidirectionalActuator.load(data)
     self.assertEqual(al.direction, constants.RIGHT)
     self.assertEqual(a.state, al.state)
예제 #2
0
 def test_unidirectional(self):
     a = actuators.UnidirectionalActuator()
     self.assertEqual(a.next_move(), constants.RIGHT)
     a = actuators.UnidirectionalActuator(direction=None)
     self.assertEqual(a.next_move(), constants.RIGHT)