Enable test coverage in tox
tox for cover doesn't work well. This patch fix it.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user