# HG changeset patch # Parent 8839e2432d111429398fef2aaeaea773f4d826dc Issue #22153: Correct documentation of TestCase.runTest() diff -r 8839e2432d11 Doc/library/unittest.rst --- a/Doc/library/unittest.rst Sat Dec 06 11:36:32 2014 -0500 +++ b/Doc/library/unittest.rst Sat Dec 06 23:42:45 2014 +0000 @@ -653,10 +653,8 @@ kinds of failure. Each instance of :class:`TestCase` will run a single base method: the method - named *methodName*. However, the standard implementation of the default - *methodName*, ``runTest()``, will run every method starting with ``test`` - as an individual test, and count successes and failures accordingly. - Therefore, in most uses of :class:`TestCase`, you will neither change + named *methodName*. + In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement the default ``runTest()`` method. .. versionchanged:: 3.2 @@ -1560,6 +1558,12 @@ Return a suite of all tests cases contained in the :class:`TestCase`\ -derived :class:`testCaseClass`. + A test case instance is created for each method named by + :meth:`getTestCaseNames`. By default these are the method names + beginning with ``test``. If :meth:`getTestCaseNames` returns no + methods, but the :meth:`runTest` method is implemented, a single test + case is created for that method instead. + .. method:: loadTestsFromModule(module)