diff --git a/.gitignore b/.gitignore index f2299e4..c26981f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.sqlite3 *~ *.log +.coverage python_adjutant.egg-info/* dist/* .tox/* diff --git a/test-requirements.txt b/test-requirements.txt index 3b79276..954ab24 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ mock==1.2.0 flake8>=3.0.4 +coverage>=4.4.1 diff --git a/tox.ini b/tox.ini index 6af3f9a..eacd036 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,pep8 +envlist = py27,pep8,coverage skipsdist = True [testenv] @@ -12,6 +12,11 @@ setenv = VIRTUAL_ENV={envdir} [testenv:pep8] commands = flake8 +[testenv:coverage] +commands = + coverage run --source='.' .tox/coverage/bin/adjutant-api test {posargs} + coverage report --include adjutant/* -m + [flake8] ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401 show-source = true