Julien Palard added the comment:
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
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30523>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com