tox: Trivial cleanup

Move 'basepython' to the top-level 'testenv'.
Use the default 'install_command'

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

Change-Id: I255de2a755b7783f20925d8ca4de6e34e5aee36b
This commit is contained in:
Hervé Beraud 2019-12-20 11:12:09 +01:00
parent e86fb9dcce
commit 9895587136
1 changed files with 3 additions and 10 deletions

13
tox.ini
View File

@ -1,13 +1,14 @@
[tox]
minversion = 2.0
minversion = 3.1
envlist = py27,py37,pep8,bandit
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=oslo.service
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
@ -19,18 +20,15 @@ commands =
stestr run --slowest {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8
bandit -r oslo_service -n5 -x tests
doc8 --ignore-path "doc/source/history.rst" doc/source
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
whitelist_externals =
rm
commands =
@ -38,7 +36,6 @@ commands =
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_service --testr-args='{posargs}'
[flake8]
@ -53,11 +50,9 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import_exceptions = oslo_service._i18n
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t oslo_service/tests {posargs}
[testenv:bandit]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@ -65,7 +60,6 @@ deps =
commands = bandit -r oslo_service -n5 -x tests {posargs}
[testenv:releasenotes]
basepython = python3
whitelist_externals =
rm
commands =
@ -73,7 +67,6 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt