示例#1
0
def test_aoeu_input_exception():
    with pytest.raises(TypeError):
        fibonacci('aoeu')
示例#2
0
def test_negative_input_exception():
    with pytest.raises(ValueError):
        fibonacci(-1)
示例#3
0
def test_none_input_exception():
    with pytest.raises(TypeError):
        fibonacci(None)
示例#4
0
def test_eval(test_input, expected):
    assert fibonacci(test_input) == expected
示例#5
0
def test_five_input():
    assert fibonacci(5) == 5
示例#6
0
def test_one_input():
    assert fibonacci(1) == 1
示例#7
0
def test_zero_input():
    assert fibonacci(0) == 0