You can run the tests in the entropy/tests directory with:
python -m unittest discover -s entropy
Note that because of the simplicity of this repository, you can also run them with python -m unittest and it will find the unit tests. More complex repositories will need the discover and -s search path.
A few things to note:
- It is important to have
__init__.pyfiles in the package directory (not the respository root) and thetestsdirectory forunittestto discover your tests. - In the
tests_entropy.pyfile, do not use relative imports. Theunittestframework will execute the tests as if they are in the root of the repository.