gerritlib/tox.ini
Sorin Sbarnea 8ceeaa5a20 Decouple linters from unit testing
Avoids conflicts between unit testing and linter and avoids
installing unneeded dependencies on both of them.

Change-Id: Id384a998bea298612ec65eaa329f85a38afee3f6
2020-09-28 16:45:59 +01:00

35 lines
820 B
INI

[tox]
minversion = 1.6
skipsdist = True
skip_missing_interpreters = false
# https://docs.python.org/devguide/#status-of-python-branches
envlist = pep8, py{38,37,36,35,27,py}
[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands =
stestr run --slowest {posargs}
[testenv:pep8]
deps =
hacking
commands = flake8
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:venv]
commands = {posargs}
[flake8]
show-source = True
# These are ignored intentionally in infra projects;
# please don't submit patches that solely correct them or enable them.
ignore =
E124,E125,E129,E252,E402,E741,H,W503,W504
N802 # N802 function name {} should be lowercase
exclude = .venv,.tox,dist,doc,build,*.egg