Dennis Dmitriev | e56c8b9 | 2017-06-16 01:53:16 +0300 | [diff] [blame] | 1 | # 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] |
| 7 | minversion = 2.0 |
| 8 | envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}, cover, docs |
| 9 | skipsdist = True |
| 10 | skip_missing_interpreters = True |
| 11 | |
| 12 | |
| 13 | [testenv] |
| 14 | usedevelop = True |
| 15 | passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY |
| 16 | deps = |
| 17 | sphinx |
| 18 | -r{toxinidir}/test-requirements.txt |
| 19 | commands = |
| 20 | py.test -vv {posargs:reclass_tools/tests} |
| 21 | |
| 22 | [testenv:venv] |
| 23 | commands = {posargs:} |
| 24 | |
| 25 | [testenv:cover] |
| 26 | deps = |
| 27 | pytest-cov |
| 28 | -r{toxinidir}/test-requirements.txt |
| 29 | commands = |
| 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] |
| 36 | deps = hacking==0.10.1 |
| 37 | usedevelop = False |
| 38 | commands = |
| 39 | flake8 |
| 40 | |
| 41 | [testenv:pylint] |
| 42 | deps = |
| 43 | -r{toxinidir}/test-requirements.txt |
| 44 | pylint |
| 45 | commands = |
| 46 | pylint --rcfile=.pylintrc_gerrit reclass_tools |
| 47 | |
| 48 | [testenv:pylint-py27] |
| 49 | deps= |
| 50 | -r{toxinidir}/test-requirements.txt |
| 51 | pylint |
| 52 | commands=pylint reclass_tools |
| 53 | |
| 54 | [testenv:pylint-py34] |
| 55 | deps= |
| 56 | -r{toxinidir}/test-requirements.txt |
| 57 | pylint |
| 58 | commands=pylint reclass_tools |
| 59 | |
| 60 | [testenv:pylint-py35] |
| 61 | deps= |
| 62 | -r{toxinidir}/test-requirements.txt |
| 63 | pylint |
| 64 | commands=pylint reclass_tools |
| 65 | |
| 66 | [flake8] |
| 67 | exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs |
| 68 | show-pep8 = True |
| 69 | show-source = True |
| 70 | count = True |
| 71 | |
| 72 | [pytest] |
| 73 | |
| 74 | [testenv:docs] |
| 75 | deps = |
| 76 | sphinx |
| 77 | commands = python setup.py build_sphinx |