|
1 | 1 | [tox] |
2 | | -minversion=1.6.0 |
3 | | -envlist=py26,py27,py33,py34,py26-flake8,py34-flake8,py26-coverage,py34-coverage,docs |
| 2 | +minversion=1.9.0 |
| 3 | +envlist=py{26,27,33,34}-{test,lint,covr},docs |
4 | 4 |
|
5 | 5 | [testenv] |
6 | | -commands=py.test riemann_client |
7 | | -deps=pytest |
| 6 | +commands= |
| 7 | + test: py.test riemann_client |
| 8 | + lint: flake8 --config tox.ini riemann_client |
| 9 | + covr: coverage run --rcfile tox.ini --source riemann_client --module py.test |
| 10 | + covr: coverage report --rcfile tox.ini |
| 11 | +deps= |
| 12 | + test: pytest |
| 13 | + lint: flake8 |
| 14 | + covr: pytest |
| 15 | + covr: coverage |
8 | 16 |
|
9 | 17 | [pytest] |
10 | 18 | addopts=-qq --strict --tb=short |
11 | 19 |
|
12 | | -# flake8 - pep8 and pyflakes checking |
13 | | -# pyflakes statically analyses python source files |
14 | | -# pep8 checks python source code against the PEP8 style conventions |
15 | | - |
16 | | -[testenv:py26-flake8] |
17 | | -commands=flake8 --config=tox.ini riemann_client |
18 | | -basepython=python2.6 |
19 | | -deps=flake8 |
20 | | - |
21 | | -[testenv:py34-flake8] |
22 | | -commands=flake8 --config=tox.ini riemann_client |
23 | | -basepython=python3.4 |
24 | | -deps=flake8 |
25 | | - |
26 | 20 | [flake8] |
27 | 21 | exclude=riemann_client/riemann_pb2_py*.py |
28 | 22 | max-complexity=10 |
29 | 23 |
|
30 | 24 | # Coverage report |
31 | 25 | # $ tox -e py26-coverage && firefox .tox/py26-coverage/index.html |
32 | 26 |
|
33 | | -[testenv:py26-coverage] |
34 | | -basepython=python2.6 |
35 | | -commands= |
36 | | - coverage run --rcfile tox.ini --source riemann_client -m py.test |
37 | | - coverage html --rcfile tox.ini |
38 | | -deps= |
39 | | - {[testenv]deps} |
40 | | - coverage |
41 | | - |
42 | | -[testenv:py34-coverage] |
43 | | -basepython=python3.4 |
44 | | -commands= |
45 | | - coverage run --rcfile tox.ini --source riemann_client -m py.test |
46 | | - coverage html --rcfile tox.ini |
47 | | -deps= |
48 | | - {[testenv]deps} |
49 | | - coverage |
50 | | - |
51 | 27 | [run] |
52 | | -data_file=.tox/py26-coverage/data |
53 | | -omit= |
54 | | - riemann_client/tests/* |
| 28 | +data_file=.tox/coverage |
| 29 | +omit=riemann_client/tests/* |
55 | 30 |
|
56 | 31 | [report] |
57 | 32 | exclude_lines= |
58 | 33 | def __repr__ |
59 | 34 | raise NotImplementedError |
60 | 35 | pass |
61 | 36 |
|
62 | | -[html] |
63 | | -title=riemann-client coverage report |
64 | | -directory=.tox/py26-coverage |
65 | | - |
66 | | -# Documentation |
67 | | -# Builds documentation using sphinx |
| 37 | +# Documentation build using Sphinx |
| 38 | +# $ tox -e docs && firefox docs/_build/index.hmtl |
68 | 39 |
|
69 | 40 | [testenv:docs] |
70 | 41 | basepython=python2.6 |
|
0 commit comments