Skip to content

Commit 587dac5

Browse files
committed
[build] Fixes a bug that prevented the pytest-min tox environment from 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]>
1 parent 549950f commit 587dac5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tox.ini

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ passenv =
77

88
[testenv]
99
extras = testing
10-
deps =
11-
--requirement dependencies/default/requirements.txt
12-
--constraint dependencies/default/constraints.txt
10+
install_command = python -m pip install \
11+
--requirement dependencies/default/requirements.txt \
12+
--constraint dependencies/default/constraints.txt \
13+
{opts} {packages}
1314
commands = make test
1415
allowlist_externals =
1516
make
1617

1718
[testenv:pytest-min]
1819
extras = testing
19-
deps =
20-
--requirement dependencies/pytest-min/requirements.txt
21-
--constraint dependencies/pytest-min/constraints.txt
20+
install_command = python -m pip install \
21+
--requirement dependencies/pytest-min/requirements.txt \
22+
--constraint dependencies/pytest-min/constraints.txt \
23+
{opts} {packages}
2224
commands = make test
2325
allowlist_externals =
2426
make

0 commit comments

Comments
 (0)