[Numpy-discussion] Option parsing: tox and test-installed-numpy.py

Chris Ball s0454615@sms.ed.ac...
Sun Jul 8 13:30:55 CDT 2012

On Sun, Jul 8, 2012 at 6:52 PM, Nathaniel Smith <njs@pobox.com> wrote:
> On Sun, Jul 8, 2012 at 6:44 PM, Chris Ball <s0454615@sms.ed.ac.uk> wrote:
>> Hi,
>> When calling tools/test-installed-numpy.py
>> (https://github.com/numpy/numpy/blob/master/tools/test-installed-numpy.py),
>> I can pass options to nose by supplying those options after "--", eg:
>> $ python tools/test-installed-numpy.py -- --with-xunit
>> (which passes "--with-xunit" to nose).
>> NumPy's tox.ini (https://github.com/numpy/numpy/blob/master/tox.ini)
>> uses tools/test-installed-numpy.py to run the tests. To pass options
>> to test-installed-numpy.py when calling tox, I can pass the options
>> after "--", eg:
>> $ tox -- -v
>> (which passes "-v" to test-installed-numpy.py).
>> However, what I want to do is supply an option to tox that gets all
>> the way through to nose! Is there a way I can do that, or do I need to
>> edit tools/test-installed-numpy.py to have an option corresponding to
>> nose's option?
> tox -- -- --with-xunit ?

Thanks - I'd tried that (was just guessing), but it didn't work:

$ tox -e py26 -- -- --with-xunit
[TOX] numpy/.tox/py26$ bin/python numpy/tools/test-installed-numpy.py
Usage: test-installed-numpy.py [options] -- [nosetests options]

test-installed-numpy.py: error: no such option: --with-xunit
[TOX] ERROR: InvocationError: 'bin/python
numpy/tools/test-installed-numpy.py --with-xunit'

If the double "--" is standard (is it?), maybe it's a problem with tox?


More information about the NumPy-Discussion mailing list