Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ddb20df0
Commit
ddb20df0
authored
Apr 04, 2010
by
Michael Foord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding documentation for new unittest.main() parameters
parent
76a23c17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Doc/library/unittest.rst
Doc/library/unittest.rst
+7
-3
No files found.
Doc/library/unittest.rst
View file @
ddb20df0
...
...
@@ -1665,8 +1665,8 @@ Loading and running tests
stream, descriptions, verbosity
.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit
, [verbosity
]]]]]]])
.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit
[, verbosity[, failfast[, catchbreak[,buffer]]]
]]]]]]])
,
A command-line program that runs a set of tests; this is primarily for making
test modules conveniently executable. The simplest use for this function is to
include the following line at the end of a test script::
...
...
@@ -1691,11 +1691,15 @@ Loading and running tests
>>> from unittest import main
>>> main(module='test_module', exit=False)
The ``failfast``, ``catchbreak`` and ``buffer`` parameters have the same
effect as the `failfast, catch and buffer command line options`_.
Calling ``main`` actually returns an instance of the ``TestProgram`` class.
This stores the result of the tests run as the ``result`` attribute.
.. versionchanged:: 2.7
The ``exit`` and ``verbosity`` parameters were added.
The ``exit``, ``verbosity``, ``failfast``, ``catchbreak`` and ``buffer``
parameters were added.
load_tests Protocol
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment