Skip to content

Commit

Permalink
[build] Fixes a bug that prevented the pytest-min tox environment fro…
Browse files Browse the repository at this point in the history
…m correctly using the minimum pytest version.

The "deps" option does not specify the package dependencies, but a list of packages that should be installed before the package under test. However, it's possible ot use "install_command" to specify a constraints file.
see tox-dev/tox#1939 (comment)

Signed-off-by: Michael Seifert <[email protected]>
  • Loading branch information
seifertm committed Nov 3, 2023
1 parent 549950f commit 263d96b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ passenv =

[testenv]
extras = testing
deps =
--requirement dependencies/default/requirements.txt
--constraint dependencies/default/constraints.txt
install_command = python -m pip install \
--requirement dependencies/default/requirements.txt \
--constraint dependencies/default/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make

[testenv:pytest-min]
extras = testing
deps =
--requirement dependencies/pytest-min/requirements.txt
--constraint dependencies/pytest-min/constraints.txt
install_command = python -m pip install \
--requirement dependencies/pytest-min/requirements.txt \
--constraint dependencies/pytest-min/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make
Expand Down

0 comments on commit 263d96b

Please sign in to comment.