Initial tox.ini
This commit is contained in:
parent
0b1c82f016
commit
95c0f1011c
5
etc/oslo-config-generator/tatu.ini
Normal file
5
etc/oslo-config-generator/tatu.ini
Normal file
@ -0,0 +1,5 @@
|
||||
[DEFAULT]
|
||||
output_file = etc/tatu.ini.sample
|
||||
wrap_width = 79
|
||||
namespace = tatu
|
||||
namespace = castellan
|
11
test-requirements.txt
Normal file
11
test-requirements.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
hacking<0.11,>=0.10.0
|
||||
|
||||
coverage>=3.6 # Apache-2.0
|
||||
mock>=2.0 # BSD
|
||||
os-testr>=0.7.0 # Apache-2.0
|
||||
bandit>=1.0.1 # Apache-2.0
|
54
tox.ini
Normal file
54
tox.ini
Normal file
@ -0,0 +1,54 @@
|
||||
[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
|
Loading…
Reference in New Issue
Block a user