Solutions to Project Euler problems in Python3
- Python3
src/
: the source modules grouped under one package.
tests/
: unit test files.
Each source module is the solution to one question from the project. Source modules are numbered according to corresponding problem number in Project Euler.
Each source module has its own test file. Test file names follow Python test discovery convention. For example, test_p001.py
is the test file for p001.py
.
Source modules are grouped under a package called src
and can be imported from repo's root directory as:
from src import p1
To run all tests, from root of the repo run:
python -m unittest
To run a specific test file such as test_p001.py
:
python -m unittest tests/test_p1.py