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: Ifc0557996260608bbbb9437fe527e0fef5f05415
This commit is contained in:
huang.zhiping 2018-06-08 23:05:26 +08:00 committed by Eric Kao
parent 5a0a161fd1
commit 7fbfd09ac8
1 changed files with 5 additions and 0 deletions

View File

@ -13,15 +13,18 @@ deps =
commands = python manage.py test {posargs} --settings=congress_dashboard.test.settings
[testenv:pep8]
basepython = python3
usedevelop = False
deps =
commands = {toxinidir}/tools/pip-install-single-req.sh test-requirements.txt hacking
flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
coverage erase
coverage run {toxinidir}/manage.py test congress_dashboard --settings=congress_dashboard.test.settings {posargs} --exclude-dir=congress_dashboard/test/integration_tests {posargs}
@ -29,12 +32,14 @@ commands =
coverage html --omit '.tox/cover/*' -d 'cover/htmlcov'
[testenv:docs]
basepython = python3
setenv = DJANGO_SETTINGS_MODULE=congress_dashboard.test.settings
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[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