You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dinglehopper/README-DEV.md

831 B

Testing

Use pytest to run the tests in the tests directory:

virtualenv -p /usr/bin/python3 venv
. venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pytest

Test running examples

Only unit tests:

pytest -m "not integration"

Only integration tests:

pytest -m integration

All tests:

pytest

All tests with code coverage:

pytest --cov=dinglehopper --cov-report=html

Static code analysis:

pytest -k "not test" --mypy
pytest -k "not test" --ruff

How to use pre-commit

This project optionally uses pre-commit to check commits. To use it:

  • Install pre-commit, e.g. pip install -r requirements-dev.txt
  • Install the repo-local git hooks: pre-commit install