diff --git a/testproject/.coveragerc b/testproject/.coveragerc index 443d248..87ca0dc 100644 --- a/testproject/.coveragerc +++ b/testproject/.coveragerc @@ -3,8 +3,10 @@ branch = True source = captcha omit = - ../*migrations* - ../*tests* - ../*management* + ../captcha/migrations/* + ../captcha/tests/* + ../captcha/management/* + [report] precision = 2 +fail_under = 80.0 diff --git a/tox.ini b/tox.ini index 956c5d0..9ab05d9 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ envlist = py{39,310}-django42-jinja2, py{310,311}-django{42,50}-jinja2, py312-django{50,51}-jinja2, - gettext,flake8,docs + gettext,flake8,docs,coverage [gh-actions] python = @@ -93,3 +93,15 @@ deps = changedir = docs commands= sphinx-build -b html . _build/html + + +[testenv:coverage] +changedir = testproject + +deps = + coverage + +commands= + # coverage debug config + coverage run --rcfile=.coveragerc manage.py test captcha + coverage report --rcfile=.coveragerc