Example #1
0
def test_fact() :
    result = m.fact(3)
    assert result == 6
Example #2
0
def test_fact_float() :
    with pytest.raises(ValueError) :
        result = m.fact(8.99)
Example #3
0
def test_fact_zero() :
    result = m.fact(0)
    assert result == 1
Example #4
0
def test_fact_zero_float() :
    with pytest.raises(ValueError) :
        result = m.fact(0.25)
Example #5
0
def test_fact_neg() :
    with pytest.raises(ValueError) :
        result = m.fact(-3)