Merge "Fix the coverage tox target"

This commit is contained in:
Zuul 2018-07-11 23:18:45 +00:00 committed by Gerrit Code Review
commit 1679f79691
4 changed files with 18 additions and 3 deletions

13
.coveragerc Normal file
View File

@ -0,0 +1,13 @@
[run]
branch = True
source = sahara_dashboard
omit =
.tox/*
sahara_dashboard/test/*
[paths]
source = sahara_dashboard
[report]
ignore_errors = True
precision = 3

View File

@ -111,7 +111,6 @@ six==1.10.0
statsd==3.2.1
stevedore==1.20.0
tenacity==3.2.1
testrepository==0.0.18
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0

View File

@ -11,7 +11,6 @@ netifaces>=0.10.4 # MIT
nose-exclude>=0.5.0 # LGPL
python-subunit>=1.0.0 # Apache-2.0/BSD
selenium>=2.50.1 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
# This also needs xvfb library installed on your OS

View File

@ -54,7 +54,11 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
commands =
coverage erase
coverage run {toxinidir}/manage.py test sahara_dashboard --settings=sahara_dashboard.test.settings --exclude-dir=sahara_dashboard/test/integration_tests {posargs}
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
basepython = python3