[tox] envlist = py3,pep8,releasenotes minversion = 3.1.1 ignore_basepython_conflict = True [testenv] basepython = python3 setenv = VIRTUAL_ENV={envdir} CLIENT_NAME=python-senlinclient usedevelop = True install_command = pip install {opts} {packages} deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete stestr run --slowest {posargs} allowlist_externals = find [testenv:bandit] deps = -r{toxinidir}/test-requirements.txt commands = bandit -r senlinclient -x tests -n5 -ll [testenv:pep8] commands = flake8 # Check that .po and .pot files are valid: bash -c "find senlinclient -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 --no-run-if-empty msgfmt --check-format -o /dev/null" allowlist_externals = bash [testenv:venv] commands = {posargs} [testenv:functional] setenv = {[testenv]setenv} OS_TEST_PATH = ./senlinclient/tests/functional passenv = OS_* [testenv:cover] setenv = PYTHON=coverage run --source senlinclient --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml coverage report [testenv:debug] commands = oslo_debug_helper -t senlinclient/tests {posargs} [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8] # W504 line break after binary operator ignore = D100,D101,D102,D103,D104,D105,D200,D201,D202,D204,D205,D300,D301,D400,D401,I100,I201,W504 show-source = True enable-extensions = H203,H106 exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build max-complexity=20 [hacking] import_exceptions = senlinclient.common.i18n