fix tox python3 overrides
We want to default to running all tox environments under python 3, so set the basepython value in [testenv]. 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 must explicitly set basepython in envs that are usually "automatic" - otherwise due to https://github.com/tox-dev/tox/issues/425 these will use `basepython` instead of their automatic equivalents. Change-Id: I1026110f0f1736127cf0af8ec2ef791a0f999e3a Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
3b4e420603
commit
4a6cdbd3ab
12
tox.ini
12
tox.ini
@ -4,6 +4,7 @@ envlist = py{35,27},functional,pep8,pip-missing-reqs
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
usedevelop = True
|
||||
whitelist_externals =
|
||||
bash
|
||||
@ -26,6 +27,8 @@ passenv = OS_DEBUG GENERATE_HASHES
|
||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||
|
||||
[testenv:py27]
|
||||
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
|
||||
basepython = python2.7
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
stestr run {posargs}
|
||||
@ -33,20 +36,22 @@ commands =
|
||||
stestr slowest
|
||||
|
||||
[testenv:py35]
|
||||
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
|
||||
basepython = python3.5
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
stestr run --blacklist-file=tests-py3.txt {posargs}
|
||||
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
|
||||
|
||||
[testenv:py36]
|
||||
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
|
||||
basepython = python3.6
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
stestr run --blacklist-file=tests-py3.txt {posargs}
|
||||
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
|
||||
|
||||
[testenv:pep8]
|
||||
# Let's gate pep8 under py3 by default because the py3 checks are stricter.
|
||||
basepython = python3
|
||||
deps = {[testenv]deps}
|
||||
commands =
|
||||
bash tools/flake8wrap.sh {posargs}
|
||||
@ -56,8 +61,6 @@ commands =
|
||||
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
|
||||
|
||||
[testenv:fast8]
|
||||
# Let's run fast8 under py3 by default because the py3 checks are stricter.
|
||||
basepython = python3
|
||||
# This is a subset of the full pep8 check which
|
||||
# only runs flake8 on the changes made since
|
||||
# HEAD-1. For a full flake8 run including checking
|
||||
@ -234,7 +237,6 @@ commands = bindep test
|
||||
usedevelop = False
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user