Browse Source

Make coverage tests work

The default package name for coverage doesn't work, so we need to
explicitly state it in tox.ini. We should also exclude the tests
directory as that code will typically be 100% tested, and if it's
not we don't really care.  Also excludes the coverage results from
git so it doesn't show up in git status.

Change-Id: I9e99b2c7c215a5de3c76cb2daf0f468f445774c3
changes/59/251559/3
Ben Nemec 6 years ago
parent
commit
170c0a9eb2
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      .coveragerc
  2. +1
    -0
      .gitignore
  3. +1
    -1
      tox.ini

+ 1
- 1
.coveragerc View File

@ -1,7 +1,7 @@
[run]
branch = True
source = tripleo_common
omit = tripleo_common/openstack/*
omit = tripleo_common/tests/*
[report]
ignore_errors = True

+ 1
- 0
.gitignore View File

@ -23,6 +23,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
cover
.tox
nosetests.xml
.testrepository


+ 1
- 1
tox.ini View File

@ -19,7 +19,7 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
commands = python setup.py test --coverage --coverage-package-name=tripleo_common --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx


Loading…
Cancel
Save