Пример #1
0
def test_fibonacci_complexity(size):
    for n in Fib():
        if n >= size:
            break
    pass
Пример #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"
Пример #3
0
def test_fib_iterator():
    x = Fib()
    assert hasattr(x, '__iter__'), \
        "Fib has no __iter__ special method."
Пример #4
0
def test_fib_next():
    x = Fib()
    assert hasattr(x, '__next__'), \
        "Fib has no __next__ special method."
Пример #5
0
def test_fib_next():
    x = Fib()
    assert hasattr(x, "__next__"), "Fib has no __next__ special method."