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: Ieea99ee85a01061eed68d45fc62f24dbffb98076
This commit is contained in:
huang.zhiping 2018-06-09 00:45:12 +08:00
parent 25d4cc6731
commit 58e49ad2b8
1 changed files with 7 additions and 0 deletions

View File

@ -19,9 +19,11 @@ commands =
py.test -vv {posargs:devops/tests}
[testenv:venv]
basepython = python3
commands = {posargs:}
[testenv:cover]
basepython = python3
deps =
pytest-cov
-r{toxinidir}/test-requirements.txt
@ -33,12 +35,14 @@ commands =
[testenv:pep8]
basepython = python3
deps = hacking==0.10.1
usedevelop = False
commands =
flake8
[testenv:pylint]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
pylint
@ -46,12 +50,14 @@ commands =
pylint --rcfile=.pylintrc_gerrit devops bin/dos.py
[testenv:pylint-py27]
basepython = python2.7
deps=
-r{toxinidir}/test-requirements.txt
pylint
commands=pylint devops bin/dos.py
[testenv:pylint-py35]
basepython = python3
deps=
-r{toxinidir}/test-requirements.txt
pylint
@ -67,4 +73,5 @@ count = True
DJANGO_SETTINGS_MODULE=devops.test_settings
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx