Merge pull request #4 from petrblaho/test-coverage
Test coverage reporting setup
This commit is contained in:
commit
81fa5cb355
7
.coveragerc
Normal file
7
.coveragerc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
source = tuskarclient
|
||||||
|
omit = tuskarclient/tests/*
|
||||||
|
|
||||||
|
[report]
|
||||||
|
ignore-errors = True
|
@ -5,4 +5,6 @@ install:
|
|||||||
- pip install -q -r requirements.txt --use-mirrors
|
- pip install -q -r requirements.txt --use-mirrors
|
||||||
- pip install -q -r test-requirements.txt --use-mirrors
|
- pip install -q -r test-requirements.txt --use-mirrors
|
||||||
script:
|
script:
|
||||||
- python setup.py testr
|
- python setup.py testr --coverage
|
||||||
|
after_success:
|
||||||
|
- coveralls
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
.. image:: https://travis-ci.org/jistr/python-tuskarclient.png?branch=master
|
.. image:: https://travis-ci.org/jistr/python-tuskarclient.png?branch=master
|
||||||
:target: http://travis-ci.org/jistr/python-tuskarclient
|
: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
|
||||||
|
@ -11,3 +11,6 @@ mock
|
|||||||
sphinx>=1.1.2
|
sphinx>=1.1.2
|
||||||
testrepository>=0.0.13
|
testrepository>=0.0.13
|
||||||
testtools>=0.9.26
|
testtools>=0.9.26
|
||||||
|
|
||||||
|
# for coveralls.io web service
|
||||||
|
coveralls
|
||||||
|
4
tox.ini
4
tox.ini
@ -19,7 +19,9 @@ commands = flake8
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[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]
|
[tox:jenkins]
|
||||||
downloadcache = ~/cache/pip
|
downloadcache = ~/cache/pip
|
||||||
|
Loading…
Reference in New Issue
Block a user