blob: ebc74edfb27c3eb741ac5238a429461298d57c1d [file] [log] [blame]
Dennis Dmitrieve56c8b92017-06-16 01:53:16 +03001# Tox (http://tox.testrun.org/) is a tool for running tests
2# in multiple virtualenvs. This configuration file will run the
3# test suite on all supported python versions. To use it, "pip install tox"
4# and then run "tox" from this directory.
5
6[tox]
7minversion = 2.0
8envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}, cover, docs
9skipsdist = True
10skip_missing_interpreters = True
11
12
13[testenv]
14usedevelop = True
15passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
16deps =
17 sphinx
18 -r{toxinidir}/test-requirements.txt
19commands =
20 py.test -vv {posargs:reclass_tools/tests}
21
22[testenv:venv]
23commands = {posargs:}
24
25[testenv:cover]
26deps =
27 pytest-cov
28 -r{toxinidir}/test-requirements.txt
29commands =
30 py.test --cov-config .coveragerc --cov-report html --cov=reclass_tools reclass_tools/tests
31 coverage html -d {envlogdir}
32 coverage report --fail-under 80
33
34
35[testenv:pep8]
36deps = hacking==0.10.1
37usedevelop = False
38commands =
39 flake8
40
41[testenv:pylint]
42deps =
43 -r{toxinidir}/test-requirements.txt
44 pylint
45commands =
46 pylint --rcfile=.pylintrc_gerrit reclass_tools
47
48[testenv:pylint-py27]
49deps=
50 -r{toxinidir}/test-requirements.txt
51 pylint
52commands=pylint reclass_tools
53
54[testenv:pylint-py34]
55deps=
56 -r{toxinidir}/test-requirements.txt
57 pylint
58commands=pylint reclass_tools
59
60[testenv:pylint-py35]
61deps=
62 -r{toxinidir}/test-requirements.txt
63 pylint
64commands=pylint reclass_tools
65
66[flake8]
67exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
68show-pep8 = True
69show-source = True
70count = True
71
72[pytest]
73
74[testenv:docs]
75deps =
76 sphinx
77commands = python setup.py build_sphinx