Skip to content

Commit 3d0b545

Browse files
Add support for measuring test coverage.
1 parent de2d8e0 commit 3d0b545

File tree

8 files changed

+39
-10
lines changed

8 files changed

+39
-10
lines changed

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
fail_under = 100
6+
precision = 2
7+
show_missing = True

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.coverage
12
*.pyc
23
*.egg-info/
34
__pycache__/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dist: trusty
33

44
python:
55
- '2.7'
6-
- '3.5'
6+
- '3.6'
77

8-
install: pip install tox-travis
8+
install: pip install tox-travis==0.8
99
script: tox

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.. image:: https://img.shields.io/travis/binarybirchtree/python-bijection.svg
22
:target: https://travis-ci.org/binarybirchtree/python-bijection
33

4+
.. image:: https://codecov.io/gh/binarybirchtree/python-bijection/branch/master/graph/badge.svg
5+
:target: https://codecov.io/gh/binarybirchtree/python-bijection
6+
47
.. image:: https://img.shields.io/pypi/v/bijection.svg
58
:target: https://pypi.python.org/pypi/bijection
69

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
'Topic :: Software Development',
4646
],
4747
keywords='bijection bijective function',
48-
py_modules=['bijection'],
48+
package_dir={
49+
'': 'src',
50+
},
51+
packages=[''],
4952
install_requires=['pycryptodome'],
5053
)
File renamed without changes.
File renamed without changes.

tox.ini

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,31 @@
1414
# limitations under the License.
1515

1616
[tox]
17-
envlist = py27, py35, pycodestyle
17+
envlist =
18+
py27
19+
py36
20+
pycodestyle
1821

19-
[tox:travis]
20-
2.7 = py27
21-
3.5 = py35, pycodestyle
22+
[travis]
23+
python =
24+
2.7: py27
25+
3.6: py36, codecov, pycodestyle
2226

2327
[testenv]
24-
deps = pytest
25-
commands = py.test
28+
commands = py.test --cov bijection --cov-report term
29+
deps =
30+
coverage==4.3.4
31+
pytest==3.0.7
32+
pytest-cov==2.4.0
33+
34+
[testenv:codecov]
35+
commands = codecov
36+
deps = codecov==2.0.5
37+
passenv =
38+
CI
39+
TRAVIS
40+
TRAVIS_*
2641

2742
[testenv:pycodestyle]
28-
deps = pycodestyle
2943
commands = pycodestyle
44+
deps = pycodestyle==2.3.1

0 commit comments

Comments
 (0)