61 lines
1.5 KiB
INI
61 lines
1.5 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
|
|
whitelist_externals =
|
|
/usr/bin/find
|
|
/bin/rm
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -rf .testrepository/times.dbm
|
|
ostestr {posargs} tatu/tests
|
|
|
|
[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:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py testr --coverage
|
|
coverage report
|
|
|
|
[testenv:bandit]
|
|
# Skip B104 hardcoded_bind_all_interfaces
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r tatu -n5 -x tests -ll -s B104
|
|
|
|
[flake8]
|
|
# Following checks are ignored on purpose.
|
|
# H301 one import per line
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
ignore = E251,D100,D101,D102,D202,D208,H301
|
|
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 tatu
|