Exemplo n.º 1
0
def test_fibonacci_complexity(size):
    for n in Fib():
        if n >= size:
            break
    pass
Exemplo n.º 2
0
def test_fib_values(n, fib_lst):
    x = Fib()
    test_lst = [next(x) for i in range(n)]
    assert np.array_equal(test_lst, fib_lst), \
        "fibonacci sequences are not what is expected"
Exemplo n.º 3
0
def test_fib_iterator():
    x = Fib()
    assert hasattr(x, '__iter__'), \
        "Fib has no __iter__ special method."
Exemplo n.º 4
0
def test_fib_next():
    x = Fib()
    assert hasattr(x, '__next__'), \
        "Fib has no __next__ special method."
Exemplo n.º 5
0
def test_fib_next():
    x = Fib()
    assert hasattr(x, "__next__"), "Fib has no __next__ special method."