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
9bc66825
Commit
9bc66825
authored
Apr 27, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5848: small unittest doc patch.
parent
b44c9f35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
Doc/library/unittest.rst
Doc/library/unittest.rst
+20
-3
No files found.
Doc/library/unittest.rst
View file @
9bc66825
...
...
@@ -955,7 +955,6 @@ Test cases
along with the method name.
.. versionchanged:: 2.7
In earlier versions this only returned the first line of the test
method's docstring, if available or the :const:`None`. That led to
undesirable behavior of not printing the test name when someone was
...
...
@@ -1047,6 +1046,20 @@ Grouping tests
Return the number of tests represented by this test object, including all
individual tests and sub-suites.
.. method:: __iter__()
Tests grouped by a :class:`TestSuite` are always accessed by iteration.
Subclasses can lazily provide tests by overriding :meth:`__iter__`. Note
that this method maybe called several times on a single suite
(for example when counting tests or comparing for equality)
so the tests returned must be the same for repeated iterations.
.. versionchanged:: 2.7
In earlier versions the :class:`TestSuite` accessed tests directly rather
than through iteration, so overriding :meth:`__iter__` wasn't sufficient
for providing tests.
In the typical usage of a :class:`TestSuite` object, the :meth:`run` method
is invoked by a :class:`TestRunner` rather than by the end-user test harness.
...
...
@@ -1194,7 +1207,6 @@ Loading and running tests
unexpected exception.
.. versionchanged:: 2.2
Contains formatted tracebacks instead of :func:`sys.exc_info` results.
...
...
@@ -1206,7 +1218,6 @@ Loading and running tests
:meth:`TestCase.assert\*` methods.
.. versionchanged:: 2.2
Contains formatted tracebacks instead of :func:`sys.exc_info` results.
.. attribute:: skipped
...
...
@@ -1346,6 +1357,12 @@ Loading and running tests
has a few configurable parameters, but is essentially very simple. Graphical
applications which run test suites should provide alternate implementations.
.. method:: _makeResult()
This method returns the instance of ``TestResult`` used by :meth:`run`.
It is not intended to be called directly, but can be overridden in
subclasses to provide a custom ``TestResult``.
.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader]]]]])
...
...
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