示例#1
0
def test_fibord_positive(inputs, outputs):
    """Test of calculating fibonacci number with different inputs."""
    assert f.fibord(inputs) == outputs
示例#2
0
def test_fibord_null():
    """Test of calculating fibonacci number when input is 0."""
    assert f.fibord(0) == 1
示例#3
0
def test_fibord_wrong_value_raise(inputs, outputs):
    """test on wrong input type."""
    with pytest.raises(outputs):
        f.fibord(inputs)
示例#4
0
def test_func():
    """Test of calculating fibonacci number with input 3."""
    assert fibord(3) == 3
示例#5
0
def test_func_negative():
    """Test negative cases."""
    nose.tools.assert_equals(fibord("wrong"), None)
    nose.tools.assert_equals(fibord(-1), None)
示例#6
0
def test_func_positive():
    """Test positive cases."""
    nose.tools.assert_equals(fibord(6), 13)
    nose.tools.assert_equals(fibord(7), 21)