@@ -167,13 +167,11 @@ test.regrtest` used in previous Python versions still works. Running the
167167script by itself automatically starts running all regression tests in the
168168:mod: `!test ` package. It does this by finding modules and packages whose names
169169start 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
177175tests to execute may also be passed to the script. Specifying a single
178176regression test (:program: `python -m test test_spam `) will minimize output and
179177only 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