Testing the Server¶
(.venv) $ pip install pytest pytest-cov coverage
Run Isso’s standard server test suite:
(.venv) make test
You can also run tests independently via
pytest [options] isso/tests/.
Improvements to Isso’s test coverage and/or different testing strategies are always welcome! Please see the Contribute page for further information.
Check Python code style using
(.venv) $ pip install flake8
(.venv) $ make flakes
Generate and view server test coverage:
(.venv) $ make coverage
The Continuous Integration suite running via
will throw an error if either the unit tests, the integration tests or
flake8 tests fail or the code coverage falls below 70%.
Pytest needs your Isso package to be visible in its
PATH to work, else it
will complain with:
pkg_resources.DistributionNotFound: The 'isso' distribution was not found and is required by the application
pytest directly, you need to be aware that it will prioritize
the packaged version of Isso in your
site-packages, not the one you have in
your current working directory.
That is why you should uninstall the
pip package of Isso and set
PYTHONPATH=. before running tests. The project
Makefile already does
the latter for you.
pip install -e . to install Isso as an “editable”
package (the package in
site-packages will be a symlink to your current
This section of the Isso documentation is incomplete. Please help by expanding it.
Edit on GitHub button in the top right corner and read the
GitHub Issue named
Improve & Expand Documentation
for further information.
Maybe some links to “how to write good python tests”
… and other things about server testing that should be documented.