Right now the way I'm running things is I have a set of test cases written with pytest that I run, if they fail then I fix and rework on. If they pass I use pytest-cov to get coverage and manually decide whether coverage is good enough. I was wondering if it was possible for pytest to fail if threshold for coverage is under x amount.
pytest --cov=myproject tests --cov-report=html
coverage report --fail-under=80
....
myproject/services/subnet.py 36 33 8%
myproject/severity.py 5 0 100%
--------------------------------------------------------------------------------------------------------------------
TOTAL 8843 8739 1%
....
coverage report --fail-under=80
doesn't seem to do anything but spit out the sameoutput pytest had. This is what I'm running (edited) – Embouchure