def test_turn_raised_exception_for_incorrect_instruction(self): rover = Rover(self.coordinate, East()) self.assertRaises(InstructionException, rover.turn("W"))
def test_turn_changes_direction_for_R_instruction(self): rover = Rover(self.coordinate, East()) rover.turn("R") self.assertEqual(rover.direction, South())