diff options
author | Michael Foord <michael@python.org> | 2011-03-14 23:01:46 (GMT) |
---|---|---|
committer | Michael Foord <michael@python.org> | 2011-03-14 23:01:46 (GMT) |
commit | 1341bb0019868345bab8adff94263c81e1d66eae (patch) | |
tree | 95af5b839e2972aa3d678484da0c2eac95fb2f69 /Doc/library/unittest.rst | |
parent | ba3a978fc1b877bd61602e6997d960a98e474311 (diff) | |
download | cpython-1341bb0019868345bab8adff94263c81e1d66eae.zip cpython-1341bb0019868345bab8adff94263c81e1d66eae.tar.gz cpython-1341bb0019868345bab8adff94263c81e1d66eae.tar.bz2 |
Closes issue 11407. TestCase.run returns the result object used or created
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r-- | Doc/library/unittest.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index a3de29b..a4e2cab 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -723,7 +723,7 @@ Test cases Here, we create two instances of :class:`WidgetTestCase`, each of which runs a single test. - .. versionchanged:: + .. versionchanged:: 3.2 `TestCase` can be instantiated successfully without providing a method name. This makes it easier to experiment with `TestCase` from the interactive interpreter. @@ -792,11 +792,14 @@ Test cases Run the test, collecting the result into the test result object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`defaultTestResult` method) and - used. The result object is not returned to :meth:`run`'s caller. + used. The result object is returned to :meth:`run`'s caller. The same effect may be had by simply calling the :class:`TestCase` instance. + .. versionchanged:: 3.3 + Previous versions of ``run`` did not return the result. Neither did + calling an instance. .. method:: skipTest(reason) |