This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mdk
Recipients ezio.melotti, mdk, michael.foord, rbcollins, serhiy.storchaka, vstinner
Date 2017-06-03.16:42:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496508125.25.0.00369096205898.issue30523@psf.upfronthosting.co.za>
In-reply-to
Content
It works in "discover" mode, I tested:

./python -m unittest discover ./Lib/unittest/test/ --list-tests

and it worked.

So maybe the --list-tests should be moved to _getDiscoveryArgParser?

Also spotted that tests are printed on stderr, typically when the users asks for something, it has to be printed to stdout. Typically usages are written on stderr in case of error, but on stdout when explicitly asked via --help, see:

$ ./python -m unittest discover ./Lib/unittest/test/ --tabayo | wc
usage: python -m unittest discover [-h] [-v] [-q] [--locals] [-f] [-c] [-b]
                                   [-s START] [-p PATTERN] [-t TOP]
                                   [--list-tests]
python -m unittest discover: error: unrecognized arguments: --tabayo
      0       0       0
$ ./python -m unittest discover ./Lib/unittest/test/ --help | wc
     23     129    1110
History
Date User Action Args
2017-06-03 16:42:05mdksetrecipients: + mdk, vstinner, rbcollins, ezio.melotti, michael.foord, serhiy.storchaka
2017-06-03 16:42:05mdksetmessageid: <1496508125.25.0.00369096205898.issue30523@psf.upfronthosting.co.za>
2017-06-03 16:42:05mdklinkissue30523 messages
2017-06-03 16:42:05mdkcreate