Enable test coverage for python in tox

At the moment, tox for cover doesn't work well.
This patch fix it.

Change-Id: Ia02099b29e0710d316a883f85fea4789885ebea6
This commit is contained in:
Kenji Ishii 2016-09-14 08:49:28 +09:00 committed by Shu Muto
parent f6784a2879
commit b5d31d5ec7
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ npm-debug.log
*.lock *.lock
*.egg* *.egg*
*.swp *.swp
.coverage*

View File

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