[tox] minversion = 3.1.1 envlist = py3,pep8 skipsdist = True ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning OS_TEST_PATH=./ovsdbapp/tests/unit OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt hacking>=3.0.1,<3.1.0 # Apache-2.0 commands = stestr run --slowest {posargs} [testenv:pep8] commands = flake8 {toxinidir}/tools/coding-checks.sh --all '{posargs}' deps = {[testenv]deps} pylint==2.5.3 # GPLv2 [testenv:venv] commands = {posargs} [testenv:cover] commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html [testenv:pdf-docs] envdir = {toxworkdir}/docs deps = {[testenv:docs]deps} whitelist_externals = make commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [testenv:releasenotes] deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [testenv:functional] setenv = {[testenv]setenv} OS_TEST_PATH=./ovsdbapp/tests/functional OVS_SRCDIR={envdir}/src/ovs OVN_SRCDIR={envdir}/src/ovn VTEP_SRCDIR={envdir}/src/ovs/vtep OVS_BRANCH={env:OVS_BRANCH:} OVN_BRANCH={env:OVN_BRANCH:} passenv = KEEP_VENV commands = {toxinidir}/tools/setup-ovs.sh {[testenv]commands} [flake8] # W504 line break after binary operator ignore = W504 # H106: Don't put vim configuration in source files # H203: Use assertIs(Not)None to check for None # H204: Use assert(Not)Equal to check for equality # H205: Use assert(Greater|Less)(Equal) for comparison # H904: Delay string interpolations at logging calls enable-extensions=H106,H203,H204,H205,H904 show-source = True exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build import-order-style = pep8