Fix unittest coverage bug

change the way of unittest coverage checking.
Story: #2008517

Change-Id: Iff7ebc1359f7920c797b684e2d2c94639c0a42bb
This commit is contained in:
qianshuai 2021-01-18 09:51:11 +00:00 committed by Min Li
parent a3d0f4e626
commit 12eca8ae61
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@
- project:
templates:
- check-requirements
- openstack-cover-jobs
- horizon-nodejs10-jobs
- horizon-non-primary-django-jobs
- openstack-python3-wallaby-jobs

View File

@ -52,7 +52,11 @@ commands =
npm run {posargs:test}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
commands =
coverage erase
coverage run --source=ironic_ui {toxinidir}/manage.py test ironic_ui.test.tests --settings=ironic_ui.test.settings {posargs}
coverage xml
coverage html -d ./cover --omit='*tests*'
[testenv:docs]
deps =