mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Issue 10470: 'python -m unittest' launches test discovery by default.(If you need to pass options to test discovery the discover subcommand must still be specified explicitly.)
This commit is contained in:
parent
47c74ac977
commit
086f30815c
5 changed files with 54 additions and 14 deletions
|
@ -109,7 +109,8 @@ class TestProgram(object):
|
|||
sys.exit(2)
|
||||
|
||||
def parseArgs(self, argv):
|
||||
if len(argv) > 1 and argv[1].lower() == 'discover':
|
||||
if ((len(argv) > 1 and argv[1].lower() == 'discover') or
|
||||
(len(argv) == 1 and self.module is None)):
|
||||
self._do_discovery(argv[2:])
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue