summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2010-11-21 21:28:01 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2010-11-21 21:28:01 (GMT)
commit086f30815c0f674326fe78ba83689d0a2a96b8d7 (patch)
tree3c9ae9c0afa50d255f093cf730cafefbd5751efd /Doc
parent47c74ac97798950d3fbe973d0b9b9f292ae76eab (diff)
downloadcpython-086f30815c0f674326fe78ba83689d0a2a96b8d7.zip
cpython-086f30815c0f674326fe78ba83689d0a2a96b8d7.tar.gz
cpython-086f30815c0f674326fe78ba83689d0a2a96b8d7.tar.bz2
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.)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index a25fd54..640ed4b 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -208,6 +208,10 @@ You can run tests with more detail (higher verbosity) by passing in the -v flag:
python -m unittest -v test_module
+When executed without arguments :ref:`unittest-test-discovery` is started::
+
+ python -m unittest
+
For a list of all the command-line options::
python -m unittest -h
@@ -266,6 +270,12 @@ used from the command line. The basic command-line usage is::
cd project_directory
python -m unittest discover
+.. note::
+
+ As a shortcut, ``python -m unittest`` is the equivalent of
+ ``python -m unittest discover``. If you want to pass arguments to test
+ discovery the `discover` sub-command must be used explicitly.
+
The ``discover`` sub-command has the following options:
.. program:: unittest discover