[tox] minversion = 2.0 # envlist = pep8 envlist = py27,pep8 # tox does not work if the path to the workdir is too long, so move it to /tmp toxworkdir = /tmp/{env:USER}_inventorytox cgcsdir = {toxinidir}/../../.. wrsdir = {toxinidir}/../../../../../../../.. distshare={toxworkdir}/.tox/distshare [testenv] # sitepackages = True install_command = pip install \ -v -v -v \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ {opts} {packages} whitelist_externals = bash find setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 INVENTORY_TEST_ENV=True TOX_WORK_DIR={toxworkdir} PYLINTHOME={toxworkdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -e{[tox]cgcsdir}/config/tsconfig/tsconfig -e{[tox]cgcsdir}/config/sysinv/cgts-client/cgts-client -e{[tox]cgcsdir}/fault/fm-api -e{[tox]cgcsdir}/fault/python-fmclient/fmclient -e{[tox]cgcsdir}/config/controllerconfig/controllerconfig -e{[tox]cgcsdir}/update/cgcs-patch/cgcs-patch -e{[tox]cgcsdir}/utilities/utilities/platform-util/platform-util commands = find . -type f -name "*.pyc" -delete find . -type f -name ".coverage\.*" -delete coverage erase [testenv:py27] basepython = python2.7 commands = {[testenv]commands} stestr run {posargs} stestr slowest [testenv:pep8] commands = flake8 {posargs} [testenv:venv] commands = {posargs} [testenv:cover] deps = {[testenv]deps} -e{[tox]cgcsdir}/config/tsconfig/tsconfig -e{[tox]cgcsdir}/fault/fm-api -e{[tox]cgcsdir}/fault/python-fmclient/fmclient -e{[tox]cgcsdir}/config/controllerconfig/controllerconfig -e{[tox]cgcsdir}/config/sysinv/cgts-client/cgts-client -e{[tox]cgcsdir}/update/cgcs-patch/cgcs-patch -e{[tox]cgcsdir}/utilities/utilities/platform-util/platform-util setenv = VIRTUAL_ENV={envdir} PYTHON=coverage run --source inventory --parallel-mode commands = find . -type f -name "*.pyc" -delete find . -type f -name ".coverage\.*" -delete stestr run {posargs} coverage erase coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [hacking] import_exceptions = inventory.common.i18n [flake8] # H102 Apache License format # H233 Python 3.x incompatible use of print operator # H404 multi line docstring should start without a leading new line # H405 multi line docstring summary not separated with an empty line ignore = H102,H233,H404,H405 show-source = True builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build