Fix coverage reporting for stx-distcloud-client

tox -e cover  was not working, and now it is

Coverage runs successfully in python3.
Current coverage is 64%

Story: 2003862
Task: 28017
Change-Id: Iedd821d889550f63014187c7d6ec51580533a2e2
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2018-11-20 14:45:02 -06:00
parent 8b348b91d5
commit 91ab8de870
2 changed files with 15 additions and 2 deletions

3
.gitignore vendored
View File

@ -27,6 +27,7 @@ cover/
!.coveragerc
.tox
nosetests.xml
.stestr
.testrepository
.venv
@ -55,4 +56,4 @@ ChangeLog
.*sw?
# Files created by releasenotes build
releasenotes/build
releasenotes/build

14
tox.ini
View File

@ -38,7 +38,19 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
PYTHON=coverage run --parallel-mode
PYTHONDONTWRITEBYTECODE=True
deps = {[testenv]deps}
coverage
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
coverage erase
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
coverage combine
coverage report
[testenv:debug]
basepython = python3