예제 #1
0
def test_turn_right_on_robot_not_placed():
    with pytest.raises(MissingPlaceCommandException) as e:
        robot = Robot()
        robot.turn_right()
    assert str(e.value) == 'Robot not placed.'
    assert robot.x_coordinate is None
    assert robot.y_coordinate is None
    assert robot.facing is None
예제 #2
0
def test_turn_right_on_robot_placed(input_params, expected_direction):
    robot = Robot()
    robot.place(input_params)
    robot.turn_right()
    assert robot.facing == expected_direction