To run tests, you must first install the entropy package with pip. Use:
pip install --no-deps -e .
(The option --no-deps tells pip not to install the dependencies, something we want to do because we manage our dependencies with conda, not pip. The option -e makes this an editable install so that if you change you don't have to reinstall to run the modified code.)
You can run the tests in the tests directory with:
pytest
A few things to note:
- It is important to have an installable package, with an
__init__.pyfile in the package directory and apyproject.toml. - You must install the package to be able to run the tests.
- Both the test files and the test functions must start with
test_for pytest to find them. - In the
tests_entropy.pyfile, do not use relative imports.