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: I578946bc780acfcc63388201a35e7c6fa0e10a35
This commit is contained in:
Riccardo Pittau 2024-02-12 15:00:51 +01:00
parent 99763a9655
commit 63f631ef3a

View File

@ -1,8 +1,9 @@
[tox]
minversion = 3.18.0
minversion = 4.4.0
envlist = py3,pep8
[testenv]
constrain_package_deps = true
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
@ -29,6 +30,7 @@ deps =
flake8-import-order>=0.17.1 # LGPLv3
pycodestyle>=2.0.0,<3.0.0 # MIT
Pygments>=2.2.0 # BSD
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
commands =
flake8 {posargs}
doc8 doc/source CONTRIBUTING.rst README.rst