mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-18 18:14:34 +08:00
Updated problem_06 in Project Euler (#2439)
* * rename variable * fix type hint * fix doctest * added test function * fixed import error * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
18
project_euler/problem_06/test_solutions.py
Normal file
18
project_euler/problem_06/test_solutions.py
Normal file
@ -0,0 +1,18 @@
|
||||
from .sol1 import solution as sol1
|
||||
from .sol2 import solution as sol2
|
||||
from .sol3 import solution as sol3
|
||||
from .sol4 import solution as sol4
|
||||
|
||||
|
||||
def test_solutions() -> None:
|
||||
"""
|
||||
>>> test_solutions()
|
||||
"""
|
||||
assert sol1(10) == sol2(10) == sol3(10) == sol4(10) == 2640
|
||||
assert sol1(15) == sol2(15) == sol3(15) == sol4(15) == 13160
|
||||
assert sol1(20) == sol2(20) == sol3(20) == sol4(20) == 41230
|
||||
assert sol1(50) == sol2(50) == sol3(50) == sol4(50) == 1582700
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_solutions()
|
Reference in New Issue
Block a user