Пример #1
0
def test_fib1():
    assert fibonacci_class(10).fib() == 89
Пример #2
0
def test_fac4():
    with pytest.raises(ValueError) as excinfo:
        fibonacci_class("input string").fac()
    assert str(excinfo.value) == "Invalid input (type error)"
Пример #3
0
def test_fac1():
    assert fibonacci_class(10).fac() == 3628800
Пример #4
0
def test_fac2():
    assert fibonacci_class(-5).fac() == "Invalid input (sign error)"
Пример #5
0
def test_fib3():
    with pytest.raises(ValueError) as excinfo:
        fibonacci_class(1.2).fib()
    assert str(excinfo.value) == "Invalid input (type error)"