Skip to content

Commit

Permalink
tox: fix coverage
Browse files Browse the repository at this point in the history
'tox -e cover' was broken as 'coverage' was looking for
'kuryr-kubernetes' package instead of 'kuryr_kubernetes'.

Change-Id: I3c52e5ce8b5e2fdad385a2edf16f9dc35f9286cd
  • Loading branch information
ivc committed Nov 18, 2016
1 parent f0e1c20 commit f383c67
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pip-log.txt

# Unit test / coverage reports
nosetests.xml
cover

# Translations
*.mo
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f383c67

Please sign in to comment.