Enable coverage testing

For whatever reason I couldn't make this work with testr, so at least
for now the tests will have to go through the testtools runner.
This commit is contained in:
Jamie Lennox 2014-06-15 11:12:21 +10:00
parent 1855a46508
commit 6227295409
4 changed files with 23 additions and 2 deletions

7
.coveragerc Normal file
View File

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

View File

@ -9,7 +9,10 @@ python:
- "pypy"
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -r requirements.txt -r test-requirements.txt
install: pip install coverage coveralls -r requirements.txt -r test-requirements.txt
# command to run tests, e.g. python setup.py test
script: python setup.py testr
script: coverage run -m testtools.run discover
after_success:
coveralls

View File

@ -11,6 +11,8 @@ requests-mock
.. image:: https://pypip.in/d/requests-mock/badge.png
:target: https://crate.io/packages/requests-mock?version=latest
.. image:: https://coveralls.io/repos/jamielennox/requests-mock/badge.png
:target: https://coveralls.io/r/jamielennox/requests-mock
Intro
-----

View File

@ -14,3 +14,12 @@ commands = flake8 requests_mock
deps =
flake8
{[testenv]deps}
[testenv:coverage]
commands =
coverage erase
coverage run --source requests_mock -m testtools.run discover
coverage html
deps =
coverage
{[testenv]deps}