diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..60dcd04e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,9 @@ +[run] +source = + devops +omit = + devops/tests/* + devops/migrations/* + devops/driver/dummy/* + devops/settings.py + devops/test_settings.py diff --git a/tox.ini b/tox.ini index 94e58630..d9f5afee 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ [tox] minversion = 1.6 -envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35} +envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}, cover skipsdist = True [testenv] @@ -20,6 +20,15 @@ commands = [testenv:venv] commands = {posargs:} +[testenv:cover] +deps = + pytest-cov + -r{toxinidir}/test-requirements.txt +commands = + py.test --cov-config .coveragerc --cov-report html --cov=devops devops/tests + coverage report --fail-under 65 + + [testenv:pep8] deps = hacking==0.10.1 usedevelop = False