Beispiel #1
0
# Get creative! Show how to use your module.

# The examples assume that your module is already installed
from pyproj import factorial


if __name__ == '__main__':
    print(factorial(10))
Beispiel #2
0
def test_factorial_handles_one():
    assert pyproj.factorial(1) == 1
Beispiel #3
0
def test_factorial_handles_two_through_ten():
    expected = [1, 1, 2, 6, 24, 120, 720, 5040,
                40320, 362880, 3628800]
    assert expected == [pyproj.factorial(i) for i in range(11)]
Beispiel #4
0
def test_factorial_handles_zero():
    assert pyproj.factorial(0) == 1
Beispiel #5
0
def test_factorial_handles_negative():
    assert pyproj.factorial(-1) == 1