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.)
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py
index 6acff8f..8473a33 100644
--- a/Lib/unittest/main.py
+++ b/Lib/unittest/main.py
@@ -109,7 +109,8 @@
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