79 lines
1.7 KiB
INI
79 lines
1.7 KiB
INI
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
minversion = 2.0
|
|
envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}, cover, docs
|
|
skipsdist = True
|
|
skip_missing_interpreters = True
|
|
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
deps =
|
|
sphinx
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
py.test -vv {posargs:devops/tests}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs:}
|
|
|
|
[testenv:cover]
|
|
deps =
|
|
pytest-cov
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
py.test --cov-config .coveragerc --cov-report html --cov=devops devops/tests
|
|
coverage html -d {envlogdir}
|
|
coverage report --fail-under 80
|
|
|
|
|
|
[testenv:pep8]
|
|
deps = hacking==0.10.1
|
|
usedevelop = False
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:pylint]
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
pylint
|
|
commands =
|
|
pylint --rcfile=.pylintrc_gerrit devops bin/dos.py
|
|
|
|
[testenv:pylint-py27]
|
|
deps=
|
|
-r{toxinidir}/test-requirements.txt
|
|
pylint
|
|
commands=pylint devops bin/dos.py
|
|
|
|
[testenv:pylint-py34]
|
|
deps=
|
|
-r{toxinidir}/test-requirements.txt
|
|
pylint
|
|
commands=pylint devops bin/dos.py
|
|
|
|
[testenv:pylint-py35]
|
|
deps=
|
|
-r{toxinidir}/test-requirements.txt
|
|
pylint
|
|
commands=pylint devops bin/dos.py
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
|
|
show-pep8 = True
|
|
show-source = True
|
|
count = True
|
|
|
|
[pytest]
|
|
DJANGO_SETTINGS_MODULE=devops.test_settings
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
sphinx
|
|
commands = python setup.py build_sphinx
|