[tox] minversion = 2.0 envlist = py37,pep8,functional skipsdist = True [testenv] basepython = python3 # Note the hash seed is set to 0 until senlin can be tested with a # random hash seed successfully. setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=senlin/tests/unit deps = -r{toxinidir}/test-requirements.txt usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} commands = find . -type f -name "*.py[c|o]" -delete stestr run {posargs} stestr slowest whitelist_externals = bash find rm [testenv:debug] basepython = python3 commands = oslo_debug_helper -t senlin/tests/unit {posargs} [testenv:debug-py36] basepython = python3.6 commands = oslo_debug_helper -t senlin/tests/unit {posargs} [testenv:pep8] commands = flake8 senlin doc/source/ext [testenv:genconfig] envdir = {toxworkdir}/venv commands = {toxinidir}/tools/gen-config [testenv:genpolicy] envdir = {toxworkdir}/venv commands = {toxinidir}/tools/gen-policy [testenv:venv] commands = {posargs} [testenv:cover] setenv = {[testenv]setenv} PYTHON=coverage run --source senlin --parallel-mode commands = {toxinidir}/tools/cover.sh {posargs} [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html whitelist_externals = rm [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:api-ref] deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [flake8] # Temporarily disable complaints about docstring for public module/class/method # H106 Don't put vim configuration in source files # H203 Use assertIs(Not)None to check for None ignore = D100,D101,D102,D103,D104,D105,D200,D201,D202,D204,D205,D300,D301,D400,D401,I100,I201 enable-extensions=H106,H203,H204,H205 show-source = true exclude=.venv,.git,.tox,cover,dist,*lib/python*,*egg,tools,build,releasenotes max-complexity=20 [hacking] local-check-factory = senlin.hacking.checks.factory import_exceptions = senlin.common.i18n [testenv:bandit] deps = -r{toxinidir}/test-requirements.txt commands = bandit -r senlin -x tests -s B101,B104,B110,B310,B311,B506 [testenv:lower-constraints] deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt