54 lines
1.4 KiB
INI
54 lines
1.4 KiB
INI
[tox]
|
|
minversion = 1.8
|
|
envlist = pep8,py27,pylint
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -rf .testrepository/times.dbm
|
|
ostestr {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs} .
|
|
# {[testenv:genconfig]commands}
|
|
|
|
[testenv:genconfig]
|
|
sitepackages = False
|
|
envdir = {toxworkdir}/pep8
|
|
commands = oslo-config-generator --config-file=etc/oslo-config-generator/tatu.ini
|
|
|
|
[testenv:venv]
|
|
install_command = pip install -U --force-reinstall {opts} {packages}
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage report
|
|
|
|
[flake8]
|
|
# Following checks are ignored on purpose.
|
|
#
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
# reason: no improvement in readability
|
|
ignore = E251,D100,D101,D102,D202,D208
|
|
exclude = .git,.venv,.tox,dist,tools,doc,*egg,build
|
|
max-complexity=30
|
|
|
|
[testenv:pylint]
|
|
deps =
|
|
{[testenv]deps}
|
|
pylint
|
|
commands =
|
|
pylint --rcfile=pylintrc --output-format=colorized
|
|
|
|
[hacking]
|
|
import_exceptions = dragonflow._i18n
|
|
local-check-factory = neutron_lib.hacking.checks.factory |