Skip to content

Commit 29deac1

Browse files
committed
Merge branch 'coverage'
2 parents ed1e74f + 4504537 commit 29deac1

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.travis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
language: python
2-
python: 2.7
3-
env:
4-
- TOX_ENV=py26
5-
- TOX_ENV=py27
6-
- TOX_ENV=py32
7-
- TOX_ENV=py33
8-
- TOX_ENV=pypy
2+
python:
3+
- 2.6
4+
- 2.7
5+
- 3.2
6+
- 3.3
7+
- 3.4
8+
- pypy
99

1010
install:
11-
- pip install tox
11+
- pip install coveralls --use-wheel
1212

1313
script:
14-
- tox -e $TOX_ENV
14+
- python setup.py develop
15+
- coverage run --source=pytest_mock.py runtests.py
16+
17+
after_success:
18+
- coveralls

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ of a test:
2525

2626
.. |ci| image:: http://img.shields.io/travis/nicoddemus/pytest-mock.png
2727
:target: https://travis-ci.org/nicoddemus/pytest-mock
28+
29+
.. |coverage| image:: http://img.shields.io/coveralls/nicoddemus/pytest-mock.png
30+
:target: https://coveralls.io/r/nicoddemus/pytest-mock
2831

2932
Usage
3033
=====

pytest_mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44

55

6-
if sys.version_info >= (3, 3):
6+
if sys.version_info >= (3, 3): # pragma: no cover
77
import unittest.mock as mock_module
88
else:
99
import mock as mock_module

runtests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# simple pytest wrapper so we can execute it using "coverage run"
2+
import pytest, sys
3+
sys.exit(pytest.main())

0 commit comments

Comments
 (0)