Switch on coverage support for unit tests

After we merge this patch we can use 'tox -e cover' and see how is our
code is covered with tests. It's very good for proper code process.

Change-Id: Ia39145727b0dc55879cd807e2ef4fc2de331c9a4
Implements: blueprint coverage-for-testr
This commit is contained in:
Nikolaj Starodubtsev 2013-11-28 11:27:01 +04:00
parent 0572493fc7
commit ca33dc3484
2 changed files with 5 additions and 1 deletions

View File

@ -11,3 +11,4 @@ discover
fixtures>=0.3.14
testrepository>=0.0.17
testtools>=0.9.32
coverage>=3.6

View File

@ -19,7 +19,10 @@ commands =
sitepackages = False
[testenv:cover]
commands = nosetests --no-path-adjustment --with-coverage --cover-erase --cover-package=climate --cover-inclusive []
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage \
--testr-args='^(?!.*test.*coverage).*$'
[testenv:pep8]
commands = flake8 {posargs}