Drop redundant injection of VIRTUAL_ENV

tox automatically injects the environment so no manual override is
necessary.

Also remove basepython because tox uses the python version where tox
is installed by default, and we no longer expect that the tests may run
in env with python 2.

Change-Id: I95f32db44f04658843ad6b09bed2505a90a53507
This commit is contained in:
Takashi Kajinami
2025-04-16 11:57:00 +09:00
parent 4fc65937cf
commit 395e8c52b6

24
tox.ini
View File

@@ -1,41 +1,37 @@
[tox] [tox]
minversion = 3.2.0 minversion = 3.2.0
envlist = py3,pep8 envlist = py3,pep8
ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
deps = deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = commands =
stestr run --slowest {posargs} stestr run --slowest {posargs}
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[testenv:pep8] [testenv:pep8]
deps = deps =
pre-commit>=2.6.0 # MIT pre-commit>=2.6.0 # MIT
{[testenv:docs]deps} {[testenv:docs]deps}
commands = commands =
pre-commit run -a pre-commit run -a
sphinx-build -b doctest doc/source doc/build sphinx-build -b doctest doc/source doc/build
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
setenv = setenv =
PYTHON=coverage run --source $project --parallel-mode PYTHON=coverage run --source $project --parallel-mode
commands = commands =
stestr run {posargs} stestr run {posargs}
coverage combine coverage combine
coverage html -d cover coverage html -d cover
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
deps = deps =