Merge pull request #4 from petrblaho/test-coverage

Test coverage reporting setup
This commit is contained in:
Jiří Stránský 2013-07-09 06:31:23 -07:00
commit 81fa5cb355
5 changed files with 18 additions and 2 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = tuskarclient
omit = tuskarclient/tests/*
[report]
ignore-errors = True

View File

@ -5,4 +5,6 @@ install:
- pip install -q -r requirements.txt --use-mirrors
- pip install -q -r test-requirements.txt --use-mirrors
script:
- python setup.py testr
- python setup.py testr --coverage
after_success:
- coveralls

View File

@ -1,2 +1,4 @@
.. image:: https://travis-ci.org/jistr/python-tuskarclient.png?branch=master
:target: http://travis-ci.org/jistr/python-tuskarclient
.. image:: https://coveralls.io/repos/jistr/python-tuskarclient/badge.png
:target: https://coveralls.io/r/jistr/python-tuskarclient

View File

@ -11,3 +11,6 @@ mock
sphinx>=1.1.2
testrepository>=0.0.13
testtools>=0.9.26
# for coveralls.io web service
coveralls

View File

@ -19,7 +19,9 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --omit='tuskarclient/tests/*' --testr-args='{posargs}'
commands = coverage erase
python setup.py testr --coverage --omit='tuskarclient/tests/*' --testr-args='{posargs}'
coverage report -m
[tox:jenkins]
downloadcache = ~/cache/pip