Ejemplo n.º 1
0
def test_works_with_5():
    # Arrange
    num = 5
    expected_answer = ["1", "2", "Fizz", "4", "Buzz"]

    # Act
    answer = fizzbuzz(num)

    # Assert
    assert len(answer) == len(expected_answer)

    for index in range(0, len(expected_answer)):
        assert answer[index] == expected_answer[index]
Ejemplo n.º 2
0
def test_works_with_1():
    # Arrange
    num = 1
    expected_answer = ["1"]

    # Act
    answer = fizzbuzz(num)

    # Assert
    assert len(answer) == len(expected_answer)

    for index in range(0, len(expected_answer)):
        assert answer[index] == expected_answer[index]