Skip to content

Commit 18fff4d

Browse files
committed
tox commands now have {posargs} as argument
When invoking an environement, one might want to pass extra argument to the command. That is done in tox by invoking an env and passing the extra arguments after '--' which are then available as '{posargs}'. Examples: # Reports flake8 error statistics tox -eflake8 -- --statistics # Only run test_util.py tests, printing a line per test: tox -epy27 -- --verbose git/test/test_util.py
1 parent 0441fdc commit 18fff4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
envlist = py26,py27,flake8
33

44
[testenv]
5-
commands = nosetests
5+
commands = nosetests {posargs}
66
deps = -r{toxinidir}/requirements.txt
77
-r{toxinidir}/test-requirements.txt
88

99
[testenv:cover]
10-
commands = nosetests --with-coverage
10+
commands = nosetests --with-coverage {posargs}
1111

1212
[testenv:flake8]
13-
commands = flake8
13+
commands = flake8 {posargs}
1414

1515
[testenv:venv]
1616
commands = {posargs}

0 commit comments

Comments
 (0)