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:
parent
f6784a2879
commit
b5d31d5ec7
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ npm-debug.log
|
|||||||
*.lock
|
*.lock
|
||||||
*.egg*
|
*.egg*
|
||||||
*.swp
|
*.swp
|
||||||
|
.coverage*
|
||||||
|
6
tox.ini
6
tox.ini
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user