15a9334518
According to the PTI (=Python Test Interface, http://governance.openstack.org/reference/cti/python_cti.html), pep8 is the interface for codestyle checks. Move all tests from linters to pep8. This change will be followed by a change to project-config to use pep8 for testing in the gate. Needed-By: I8d83c049165cfffd165b2e83b2ed37c1407849e3 Change-Id: Iab513d7f3a087ff7042be5cf00be4a4d2677e2cd
52 lines
1.5 KiB
INI
52 lines
1.5 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py27,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
sitepackages = True
|
|
usedevelop = True
|
|
install_command = pip install -U --force-reinstall {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
whitelist_externals = rm
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=etc/terracotta-config-generator.conf
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
bash tools/flake8wrap.sh {posargs}
|
|
|
|
# Temporary environment until infra jobs are changed.
|
|
# TODO(jaegerandi): remove this
|
|
[testenv:linters]
|
|
commands =
|
|
bash tools/flake8wrap.sh {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
|
|
# The rest of the ignores are TODOs
|
|
# New from hacking 0.9: E129, E131, H407, H405
|
|
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
|
|
|
|
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D211,D301,D400,D401,H233
|
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common/*,*lib/python*,*egg,build,tools/
|
|
# To get a list of functions that are more complex than 25, set max-complexity
|
|
# to 25 and run 'tox -epep8'.
|
|
# 34 is currently the most complex thing we have
|
|
# TODO(jogo): get this number down to 25 or so
|
|
max-complexity=35
|