Browse Source

tox: fix coverage

'tox -e cover' was broken as 'coverage' was looking for
'kuryr-kubernetes' package instead of 'kuryr_kubernetes'.

Change-Id: I3c52e5ce8b5e2fdad385a2edf16f9dc35f9286cd
changes/07/399407/1
Ilya Chukhnakov 5 years ago
parent
commit
f383c67b41
3 changed files with 20 additions and 1 deletions
  1. +17
    -0
      .coveragerc
  2. +1
    -0
      .gitignore
  3. +2
    -1
      tox.ini

+ 17
- 0
.coveragerc View File

@ -0,0 +1,17 @@
[run]
branch = True
source = kuryr_kubernetes
omit = kuryr_kubernetes/tests/*
[report]
ignore_errors = True
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:

+ 1
- 0
.gitignore View File

@ -22,6 +22,7 @@ pip-log.txt
# Unit test / coverage reports
nosetests.xml
cover
# Translations
*.mo


+ 2
- 1
tox.ini View File

@ -40,7 +40,8 @@ commands = {posargs}
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args='{posargs}'
python setup.py test --coverage --testr-args='{posargs}' \
--coverage-package-name=kuryr_kubernetes
coverage report
[testenv:docs]


Loading…
Cancel
Save