示例#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))
示例#2
0
def test_factorial_handles_one():
    assert pyproj.factorial(1) == 1
示例#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)]
示例#4
0
def test_factorial_handles_zero():
    assert pyproj.factorial(0) == 1
示例#5
0
def test_factorial_handles_negative():
    assert pyproj.factorial(-1) == 1