def test_invalid(self):
        # First set a valid value so state is known
        self.motor.direction = m_mod.FORWARD
        self.motor.direction = 2
        assert self.motor.direction == "forward"
        self.motor.direction = -1
        assert self.motor.direction == "forward"
        self.motor.direction = "wrong"
        assert self.motor.direction == "forward"
        self.motor.direction = ""
        assert self.motor.direction == "forward"
Factory method for paste.deploy.
dataset/ETHPy150Open IEEERobotics/bot/tests/test_motor.py/TestDirection.test_invalid--crossover with--dataset/ETHPy150Open openstack/oslo.middleware/oslo_middleware/base.py/ConfigurableMiddleware.factory