Skip to content

Commit 74dd288

Browse files
committed
tox.ini: fix passing {posargs} in several environments
CONTRIBUTING.rst claims the following: Or to only run tests in a particular test module on Python 3.6:: $ tox -e py36 -- testing/test_config.py But without this patch, this doesn't work: the arguments after -- are ignored and all tests are run.
1 parent 08e3b33 commit 74dd288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ envlist =
1818

1919
[testenv]
2020
commands =
21-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof
21+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs}
2222
coverage: coverage combine
2323
coverage: coverage report
2424
passenv = USER USERNAME COVERAGE_* TRAVIS
@@ -41,7 +41,7 @@ deps =
4141
py27: mock
4242
nose
4343
commands =
44-
pytest -n auto --runpytest=subprocess
44+
pytest -n auto --runpytest=subprocess {posargs}
4545

4646

4747
[testenv:linting]
@@ -58,7 +58,7 @@ deps =
5858
hypothesis>=3.56
5959
{env:_PYTEST_TOX_EXTRA_DEP:}
6060
commands =
61-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto
61+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto {posargs}
6262

6363
[testenv:py36-xdist]
6464
# NOTE: copied from above due to https://github.com/tox-dev/tox/issues/706.

0 commit comments

Comments
 (0)