Skip to content

Commit eefbcbc

Browse files
committed
Running code coverage in travis
1 parent ed1e74f commit eefbcbc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ env:
88
- TOX_ENV=pypy
99

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

1313
script:
14-
- tox -e $TOX_ENV
14+
- coverage run --source=pytest_mock.py runtox.py -e $TOX_ENV
15+
16+
after_success:
17+
- coveralls

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

runtox.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 tox, sys
3+
sys.exit(tox.cmdline())

0 commit comments

Comments
 (0)