initial commit with 2024 materials
This commit is contained in:
commit
6fdfdbb8b7
66 changed files with 102457 additions and 0 deletions
13
hands_on/factorial/test_factorial.py
Normal file
13
hands_on/factorial/test_factorial.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
""" 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
|
Loading…
Add table
Add a link
Reference in a new issue