fix tox python3 overrides

We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I8049df0d8241271122c0587b639c135836846827
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:05:56 -04:00
parent 08075d07aa
commit ed99254573
1 changed files with 8 additions and 0 deletions

View File

@ -23,11 +23,13 @@ commands =
whitelist_externals = bash
[testenv:cover]
basepython = python3
commands =
pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}"
coverage report
[testenv:pep8]
basepython = python3
deps = hacking>=0.12,<0.13
commands =
flake8
@ -35,28 +37,34 @@ commands =
bash -c "find aodh -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
setenv = PYTHONHASHSEED=0
[testenv:venv]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = {posargs}
setenv = PYTHONHASHSEED=0
[testenv:debug]
basepython = python3
commands = bash -x oslo_debug_helper {posargs}
[testenv:debug-mysql]
basepython = python3
deps = .[mysql,test]
setenv = OS_TEST_PATH=aodh/tests/functional/
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
[testenv:debug-pgsql]
basepython = python3
deps = .[postgresql,test]
setenv = OS_TEST_PATH=aodh/tests/functional/
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}