From 18fff4d4a28295500acd531a1b97bc3b89fad07e Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 14 Nov 2014 22:11:26 +0100 Subject: [PATCH] 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 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 60bfb1d97..4d8273576 100644 --- a/tox.ini +++ b/tox.ini @@ -2,15 +2,15 @@ envlist = py26,py27,flake8 [testenv] -commands = nosetests +commands = nosetests {posargs} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:cover] -commands = nosetests --with-coverage +commands = nosetests --with-coverage {posargs} [testenv:flake8] -commands = flake8 +commands = flake8 {posargs} [testenv:venv] commands = {posargs}