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: I14a93e67735df0f1b82dd687873ec77d8bfaac78
This commit is contained in:
parent
118da00f2f
commit
31ecf49b97
6
tox.ini
6
tox.ini
|
@ -1,10 +1,11 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 4.4.0
|
||||||
envlist = py3,pep8
|
envlist = py3,pep8
|
||||||
ignore_basepython_conflict=true
|
ignore_basepython_conflict=true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
constrain_package_deps = true
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
PYTHONDONTWRITEBYTECODE = 1
|
PYTHONDONTWRITEBYTECODE = 1
|
||||||
|
@ -40,6 +41,7 @@ deps =
|
||||||
pycodestyle>=2.0.0,<3.0.0 # MIT
|
pycodestyle>=2.0.0,<3.0.0 # MIT
|
||||||
Pygments>=2.2.0 # BSD
|
Pygments>=2.2.0 # BSD
|
||||||
doc8>=0.6.0 # Apache 2.0
|
doc8>=0.6.0 # Apache 2.0
|
||||||
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
doc8 README.rst doc/source --ignore D001
|
doc8 README.rst doc/source --ignore D001
|
||||||
|
@ -81,4 +83,4 @@ deps = codespell
|
||||||
# note(adamcarthur): {posargs} lets us run `tox -ecodespell -- -w` to get codespell
|
# note(adamcarthur): {posargs} lets us run `tox -ecodespell -- -w` to get codespell
|
||||||
# to correct spelling issues in our code it's aware of.
|
# to correct spelling issues in our code it's aware of.
|
||||||
commands =
|
commands =
|
||||||
codespell {posargs}
|
codespell {posargs}
|
||||||
|
|
Loading…
Reference in New Issue