10 Jul 2012 02:41
[tox] Positional arguments
Chris Ball <s0454615 <at> sms.ed.ac.uk>
2012-07-10 00:41:41 GMT
2012-07-10 00:41:41 GMT
Hi,
I'd like to have tox call a script (test.py) to start some tests. test.py takes
some arguments, but any arguments after "--" are passed to a script (script.py)
that's called by test.py. I can't work out how to supply arguments to tox that
are passed all the way through to script.py.
I'll try to make that clearer!
$ python test.py -- --version
passes "--version" to script.py.
I thought if I started tox like this:
$ tox -- -- --version
that --version would be passed to script.py. However, I get:
...
[TOX] $ .tox/py26/bin/python test.py --version
Usage: test.py [options]
test.py: error: no such option: --version
[TOX] ERROR: InvocationError: '.tox/py26/bin/python test.py --version'
This is my tox.ini:
[tox]
envlist=py26
[testenv]
commands=python test.py {posargs:}
(Continue reading)
RSS Feed