Skip to content

Testing

Philipp Niedermayer edited this page Jan 18, 2025 · 8 revisions

Testing

Tests are located in the tests folder and run with pytest. The Jupyter notebooks in the examples directory serves both, for testing and documentation. CI confirms that the notebooks can be executed without errors and that their output is reproducible.

When adding new functionality, it's always good to add a usage example to one the notebooks, or at least a unit test.

To run the tests locally call pytest in the virtual environment (see setup):

source .venv/bin/activate
pytest

Linting

The project uses pre-commit to check (and if possible fix) common oversights (formatting, docstrings, ...) automatically.

Clone this wiki locally