def test_fibonacci(): assert generateFibonacci(3) == [1, 1, 2] assert generateFibonacci(10) == [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] assert generateFibonacci(2) == [1, 1] assert generateFibonacci(1) == [1] with pytest.raises(TypeError): generateFibonacci("WrongParameterType") with pytest.raises(ValueError): generateFibonacci(0)
def test_fibonacci_2(): assert [1, 1, 2, 3, 5, 8, 13, 21] == generateFibonacci(8)
def test_fibonacci(): assert generateFibonacci(1) == [1]
def test_fibonacci_negative_number(): assert generateFibonacci(-12) == []
def test_fibonacci_length(): assert len(generateFibonacci(2)) == 2
def test_fibonacci1(): expectedValue = 1 length = 1 res = generateFibonacci(length) assert expectedValue == res, errText.format(res, expectedValue)