Repository navigation
Conversation
Documentation build overview
13 files changed ·
|
aisk
reviewed
Oct 4, 2026
Member
|
The commit email doesn't seem to be a valid address. Please use a valid one. |
bazhil
force-pushed
the
doc-regrtest-unittest-loader
branch
from
October 4, 2026 16:51
fd30727 to
58b6171
Compare
Contributor
Author
Fixed |
| names of tests to execute may also be passed to the script. Specifying a single | ||
| :mod:`!test` package. It does this by finding modules and packages whose names | ||
| start with ``test_``, importing each one, and loading its tests with | ||
| :meth:`unittest.TestLoader.loadTestsFromModule`. The loader collects |
Member
There was a problem hiding this comment.
I think this is too much unittest detail for this section, what about linking to 'load_tests Protocol' instead?
| This will help ensure that no extra children (zombies) stick around to | ||
| hog resources and create problems when looking for refleaks. | ||
| Call this from a test's :meth:`~unittest.TestCase.setUp`, | ||
| :meth:`~unittest.TestCase.tearDown`, or from ``tearDownModule`` when the |
Member
There was a problem hiding this comment.
Suggested change
| :meth:`~unittest.TestCase.tearDown`, or from ``tearDownModule`` when the | |
| :meth:`~unittest.TestCase.tearDown`, or ``tearDownModule`` when the |
Duplicate "from".
bazhil
force-pushed
the
doc-regrtest-unittest-loader
branch
from
October 7, 2026 21:38
58b6171 to
aabe5ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#158681
Doc/library/test.rstsaid thatpython -m testcalls a module-leveltest_main()when it exists, and otherwise loads tests withunittest.TestLoader.loadTestsFromModule. It also told readers to calltest.support.reap_children()at the end oftest_main. The docstring ofreap_children()said the same thing.libregrtestdoes not calltest_main(). If the imported module defines it,Lib/test/libregrtest/single.pyraisesException. regrtest reports the module as failed with an uncaught exception (stderr:test <name> crashed; summary:failed (uncaught exception)). Tests are loaded withloadTestsFromModule, which collectsTestCaseclasses and, when the module definesload_tests, runs the suite that function returns. Packages useload_tests, usually viatest.support.load_package_tests, to add tests from submodules.reap_children()is called fromsetUp(),tearDown(), andtearDownModule().The runner is unchanged. This updates the library page and the
reap_children()docstring.