[TIP] nose command line script invocation

Barry Warsaw barry at python.org
Tue Feb 26 08:20:17 PST 2013

In Debian and Ubuntu, we're dealing with the issue of the nosetests command
line scripts.  We're having a debate about how we can best package nose in
order to support a user's system where they will have at least 4 flavors of
Python installed, and possibly up to 8.  E.g.  Python 2.6, 2.7, 3.2, and 3.3,
with both debug and non-debug versions of both.

An end user may want to run nose using any or all of those flavors, but
because we don't know what's on a user's system at build time we can't
reasonably provide any /usr/bin/nosetests* scripts in the binary packages.  We
would have to create the scripts at installation, e.g. nosetests-X.Y{,-dbg},
but that is undesirable.

Our options are best summarized by this mailing list post:


I don't particularly like option #2.

In an IRC discussion of the issue, Dmitry Shachnev suggested adding -m support
to nose for those Pythons that support it.  Thus, we would encourage people to
run nose via e.g. `python3.3 -m nose [options]` and because this would work
regardless of where you got your nose package from, it could be encouraged in
the nose documentation (and tox, etc.).

AFAICT, -m is not yet supported:

% python3.3 -m nose --help
/usr/bin/python3.3: No module named nose.__main__; 'nose' is a package and cannot be directly executed

Okay, so it won't work for the older Pythons that nose still supports, but oh
well.  Users of Python 2.4 and 2.5 are already feeling enough pain that a
little more won't be noticed. <wink>

I filed this github issue to capture the request, but I wanted to see what
folks here thought about it, or if anybody had a better suggestion.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130226/06a4109e/attachment.pgp>

More information about the testing-in-python mailing list