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