Skip to content

Commit aabe5ea

Browse files
bazhilCICD Bot
authored andcommitted
Shorten the regrtest loading description and fix the reap_children wording.
1 parent 9290def commit aabe5ea

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

‎Doc/library/test.rst‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,11 @@ test.regrtest` used in previous Python versions still works. Running the
167167
script by itself automatically starts running all regression tests in the
168168
:mod:`!test` package. It does this by finding modules and packages whose names
169169
start with ``test_``, importing each one, and loading its tests with
170-
:meth:`unittest.TestLoader.loadTestsFromModule`. The loader collects
171-
:class:`unittest.TestCase` tests defined in the module. If the module defines
172-
``load_tests``, the loader calls it with that suite and runs the suite the
173-
function returns. Test packages use ``load_tests``, often via
174-
:func:`test.support.load_package_tests`, to add tests discovered in
175-
submodules. A module-level ``test_main()`` function is not called. If a test
176-
module defines ``test_main``, :mod:`!test.regrtest` fails that test. The names of
170+
:meth:`unittest.TestLoader.loadTestsFromModule`. See the
171+
:ref:`load_tests protocol <load_tests-protocol>` for how a module or package
172+
can customize what is loaded. A module-level ``test_main()`` function is not
173+
called. If a test module defines ``test_main``, :mod:`!test.regrtest` fails
174+
that test. The names of
177175
tests to execute may also be passed to the script. Specifying a single
178176
regression test (:program:`python -m test test_spam`) will minimize output and
179177
only print whether the test passed or failed.
@@ -888,7 +886,7 @@ The :mod:`!test.support` module defines the following functions:
888886
.. function:: reap_children()
889887

890888
Call this from a test's :meth:`~unittest.TestCase.setUp`,
891-
:meth:`~unittest.TestCase.tearDown`, or from ``tearDownModule`` when the
889+
:meth:`~unittest.TestCase.tearDown`, or ``tearDownModule`` when the
892890
test starts subprocesses. This will help ensure that no extra children
893891
(zombies) stick around to hog resources and create problems when looking
894892
for refleaks.

0 commit comments

Comments
 (0)