Exemple #1
0
def test_factorial():
    assert factorial.fact(4) == 4 * 3 * 2 * 1
Exemple #2
0
def test_factorial_zero():
    assert factorial.fact(0) == 1
def test_xfact():
    assert factorial.fact(4)==24
def test_int():
    assert type(factorial.fact(5)) is int
Exemple #5
0
def test_factorial_with_0():
    assert factorial.fact(0) == 1
Exemple #6
0
def test_factorial_with_5():
    assert factorial.fact(5) == 120
Exemple #7
0
def test_factorial_1():
    assert factorial.fact(0) == 1
Exemple #8
0
def test_factorial_2():
    assert factorial.fact(3) == 6
Exemple #9
0
def test_factorial():
    assert factorial.fact(2)==2
Exemple #10
0
def test_zero_factorial():
    assert factorial.fact(0)==1
def test_factorial_string():
    with pytest.raises(Exception):
        assert fact("hello")
def test_factorial_4():
    assert fact(4) == 24
def test_factorial_negative():
    assert fact(-3) == "Invalid input"