Skip to content

Commit cec238a

Browse files
committed
Added [tox.ini], [.coveragerc] and [.travis.yml]
1 parent 4d2a32b commit cec238a

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

.coveragerc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
omit =
3+
tests/*

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: python
2+
python:
3+
- 2.6
4+
- 2.7
5+
- 3.3
6+
- 3.4
7+
- 3.5
8+
- 3.6
9+
- nightly
10+
- pypy-5.4.1
11+
- pypy3
12+
install:
13+
- travis_retry pip install coveralls
14+
- travis_retry pip install tox-travis
15+
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pyOpenSSL>=16.2.0; fi
16+
script:
17+
tox
18+
after_success:
19+
coveralls

pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ python_files=*_tests.py
66

77
[report]
88
exclude_lines =
9-
nocov
9+
nocov

tox.ini

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[tox]
2+
envlist = clean,py26,py27,py33,py34,py35,py36,pypy,stats,flake8
3+
skipsdist = True
4+
5+
[testenv]
6+
deps =
7+
pytest
8+
pytest-cov
9+
commands =
10+
py.test --cov-config .coveragerc --cov-append --cov=bencode
11+
12+
[testenv:clean]
13+
skip_install = true
14+
deps =
15+
coverage
16+
commands =
17+
coverage erase
18+
19+
[testenv:flake8]
20+
basepython = python
21+
skip_install = true
22+
deps =
23+
flake8
24+
flake8-docstrings>=0.2.7
25+
flake8-import-order>=0.9
26+
flake8-import-order-fuzeman>=1.1.1
27+
commands =
28+
flake8
29+
30+
[testenv:stats]
31+
skip_install = true
32+
deps =
33+
coverage
34+
commands =
35+
coverage report -m
36+
coverage html
37+
38+
[flake8]
39+
format=pylint
40+
statistics = True
41+
ignore = D203
42+
exclude =
43+
.cache,
44+
.eggs,
45+
.git,
46+
.tox,
47+
__pycache__,
48+
build,
49+
dist,
50+
tests/fixtures/*,
51+
*.pyc,
52+
*.egg-info,
53+
show-source = True
54+
max-complexity = 10
55+
max-line-length = 120
56+
import-order-style = fuzeman
57+
application-import-names = bencode

0 commit comments

Comments
 (0)