diff --git a/tox.ini b/tox.ini index fd10c3a799..422f683b54 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,7 @@ commands = bash tools/pretty_tox.sh '{posargs}' [testenv:debug] +basepython = python3 commands = oslo_debug_helper -t magnum/tests/unit {posargs} [testenv:debug-py27] @@ -110,6 +111,7 @@ commands = bash tools/pretty_tox.sh '{posargs}' [testenv:pep8] +basepython = python3 commands = doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst bash tools/flake8wrap.sh {posargs} @@ -123,24 +125,30 @@ commands = -print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005" [testenv:venv] +basepython = python3 commands = {posargs} [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r magnum -x tests -n5 -ll [testenv:cover] +basepython = python3 commands = {toxinidir}/tools/cover.sh {posargs} [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file etc/magnum/magnum-policy-generator.conf @@ -156,6 +164,7 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools,releasenotes local-check-factory = magnum.hacking.checks.factory [testenv:pip-check-reqs] +basepython = python3 # do not install test-requirements as that will pollute the virtualenv for # determining missing packages # this also means that pip_check_reqs must be installed separately, outside @@ -165,15 +174,18 @@ deps = pip_check_reqs commands=pip-missing-reqs -d --ignore-file=magnum/tests/* magnum [testenv:releasenotes] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:install-guide] +basepython = python3 commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html [testenv:api-ref] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf api-ref/build @@ -189,6 +201,7 @@ deps = # This environment can be used to quickly validate that all needed system # packages required to successfully execute test targets are installed [testenv:bindep] +basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed