diff --git a/project_euler/problem_001/sol1.py b/project_euler/problem_001/sol1.py index fcc24c86ec54..384add445b0f 100644 --- a/project_euler/problem_001/sol1.py +++ b/project_euler/problem_001/sol1.py @@ -31,3 +31,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol2.py b/project_euler/problem_001/sol2.py index 7093d3513378..8c92c7b3b863 100644 --- a/project_euler/problem_001/sol2.py +++ b/project_euler/problem_001/sol2.py @@ -36,3 +36,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol3.py b/project_euler/problem_001/sol3.py index 8267fec84155..7302225d692b 100644 --- a/project_euler/problem_001/sol3.py +++ b/project_euler/problem_001/sol3.py @@ -62,3 +62,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol4.py b/project_euler/problem_001/sol4.py index a0643c05b34f..502f0ac85ed0 100644 --- a/project_euler/problem_001/sol4.py +++ b/project_euler/problem_001/sol4.py @@ -50,3 +50,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol5.py b/project_euler/problem_001/sol5.py index 3edc6f245a67..97f684472e08 100644 --- a/project_euler/problem_001/sol5.py +++ b/project_euler/problem_001/sol5.py @@ -30,3 +30,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol6.py b/project_euler/problem_001/sol6.py index 8ddce18ced04..e3aa159e087e 100644 --- a/project_euler/problem_001/sol6.py +++ b/project_euler/problem_001/sol6.py @@ -37,3 +37,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod() diff --git a/project_euler/problem_001/sol7.py b/project_euler/problem_001/sol7.py index 6ada70c12dbd..63d9a851e8be 100644 --- a/project_euler/problem_001/sol7.py +++ b/project_euler/problem_001/sol7.py @@ -33,3 +33,6 @@ def solution(n: int = 1000) -> int: if __name__ == "__main__": print(f"{solution() = }") + from doctest import testmod + + testmod()