Force constraints when installing a package during tox test

The tox deps option grants installation of single dependencies and
requirements, optionally pinned using constraints, before installing
a package, therefore not granting installation of the correct
constraint during the package installation.
To fix that tox 4.4.0 has introduced the constrain_package_deps
option [1]

[1] https://tox.wiki/en/4.12.1/faq.html#using-constraint-files

Change-Id: I770e55db5d6f53174c490749d27830f9209e98cc
This commit is contained in:
Riccardo Pittau 2024-02-12 14:59:39 +01:00
parent df7eccd7f1
commit d4554e4ab5

View File

@ -1,8 +1,9 @@
[tox] [tox]
minversion = 3.18.0 minversion = 4.4.0
envlist = py3,functional,pep8 envlist = py3,functional,pep8
[testenv] [testenv]
constrain_package_deps = true
usedevelop = True usedevelop = True
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
@ -51,6 +52,7 @@ deps =
flake8-import-order~=0.18.0 # LGPLv3 flake8-import-order~=0.18.0 # LGPLv3
pycodestyle>=2.0.0,<3.0.0 # MIT pycodestyle>=2.0.0,<3.0.0 # MIT
doc8~=1.1.0 # Apache-2.0 doc8~=1.1.0 # Apache-2.0
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
allowlist_externals = bash allowlist_externals = bash
{toxinidir}/tools/run_bashate.sh {toxinidir}/tools/run_bashate.sh
commands = commands =