Skip to content

Instantly share code, notes, and snippets.

@izikeros
Last active July 17, 2024 22:36
Show Gist options
  • Save izikeros/906279bee19c16a6c4dbee3c711d8d6a to your computer and use it in GitHub Desktop.
Save izikeros/906279bee19c16a6c4dbee3c711d8d6a to your computer and use it in GitHub Desktop.
[tox pytest with coverage] Pytest with coverage with threshold #pytest #tox #coverage
; this is not a complete tox.ini file but just one env!!!
[testenv:coverage]
; it requires 'setup.py' or 'pyproject.toml' to have package installable.
deps = -rrequirements.txt
-rtox-reqs/coverage.txt
; usedevelop - fix problems with 0% coverage https://stackoverflow.com/a/69462954/3247880
usedevelop=True
commands =
pytest --cov trend_classifier/ --cov-report html --cov-fail-under=70 tests/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment