2024-heraklion-testing-debu.../hands_on/factorial/test_factorial.py
2024-08-26 13:54:13 +02:00

14 lines
339 B
Python

""" Tests for the factorial function. """
from factorial import factorial
def test_factorial():
factorial_cases = [(1, 1),
(0, 1),
(5, 2*3*4*5),
(30, 265252859812191058636308480000000)]
for n, fact_n in factorial_cases:
assert factorial(n) == fact_n