Enable test coverage in tox

tox for cover doesn't work well.
This patch fix it.
This commit is contained in:
Shu Muto
2016-10-05 17:13:15 +09:00
parent 48004f0fc0
commit e326f216f0
2 changed files with 5 additions and 1 deletions

View File

@@ -23,7 +23,11 @@ commands = flake8 {posargs}
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
commands =
coverage erase
coverage run {toxinidir}/manage.py test {{cookiecutter.module_folder}} --settings={{cookiecutter.module_folder}}.test.settings {posargs} --exclude-dir={{cookiecutter.module_folder}}/test/integration_tests {posargs}
coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml'
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
[testenv:py27dj18]
basepython = python2.7