
Enforce following codestyle rules: * no xrange * no LOG.warn usage (deprecated in favour of LOG.warning) * usage of assertTrue(x) instead assertEqual(True, x) * usage of assertIsNone(x) instead assertEqual(None, x) * usage of assertIsNotNone(x) instead assertNotEqual(None, x) or assertIsNot(None, x) Change-Id: I356a9c77986557a36144f503852fac5d6ba4bc20
35 lines
889 B
INI
35 lines
889 B
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py27,py34,py35,pep8
|
|
|
|
[testenv]
|
|
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
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONPATH = {toxinidir}
|
|
commands = nosetests --tests almanach.tests.unit
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --namespace almanach --output-file=etc/almanach/almanach.conf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:pep8]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx --fresh-env
|
|
|
|
[flake8]
|
|
show-source = True
|
|
max-line-length = 120
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|
|
|
|
[hacking]
|
|
local-check-factory = almanach.hacking.checks.factory
|