diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-01-02 13:37:26 -0500 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-01-02 13:37:26 -0500 |
commit | 7cf634088192d6687a56e06fef0914a3f2c09b5b (patch) | |
tree | 88da850a66637e889c1abdce8cd2875385d0ebfe /Doc/library/unittest.rst | |
parent | 54033d7498cd0663794295bbd72a97ebf5755e39 (diff) | |
download | cpython-7cf634088192d6687a56e06fef0914a3f2c09b5b.tar.gz |
#17282: Document unittest.main defaultTest argument.
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r-- | Doc/library/unittest.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 5157b26766..fcfd514d01 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1801,6 +1801,10 @@ Loading and running tests if __name__ == '__main__': unittest.main(verbosity=2) + The *defaultTest* argument is the name of the test to run if no test names + are specified via *argv*. If not specified or ``None`` and no test names are + provided via *argv*, all tests found in *module* are run. + The *argv* argument can be a list of options passed to the program, with the first element being the program name. If not specified or ``None``, the values of :data:`sys.argv` are used. |