Skip to content

Commit 804ade0

Browse files
committed
Use tox generated environments
* Use tox generated environments for testing, linting and coverage * Ouput coverage report instead of using HTML output * Require most recent version of Tox (1.6.0 does not support generation)
1 parent 2375910 commit 804ade0

1 file changed

Lines changed: 16 additions & 45 deletions

File tree

tox.ini

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,41 @@
11
[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
44

55
[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
816

917
[pytest]
1018
addopts=-qq --strict --tb=short
1119

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-
2620
[flake8]
2721
exclude=riemann_client/riemann_pb2_py*.py
2822
max-complexity=10
2923

3024
# Coverage report
3125
# $ tox -e py26-coverage && firefox .tox/py26-coverage/index.html
3226

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-
5127
[run]
52-
data_file=.tox/py26-coverage/data
53-
omit=
54-
riemann_client/tests/*
28+
data_file=.tox/coverage
29+
omit=riemann_client/tests/*
5530

5631
[report]
5732
exclude_lines=
5833
def __repr__
5934
raise NotImplementedError
6035
pass
6136

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
6839

6940
[testenv:docs]
7041
basepython=python2.6

0 commit comments

Comments
 (0)