]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97669: Fix test_tools reference leak (#98216)
authorVictor Stinner <vstinner@python.org>
Wed, 12 Oct 2022 15:26:21 +0000 (17:26 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 15:26:21 +0000 (17:26 +0200)
commita8c8526fd8ce2f3f50837bbbb820741e54b58512
tree247722821cc188088a31d3e1d76a6af2bc6e3e0f
parent0895c2a066c64c84cab0821886dfa66efc1bdc2f
gh-97669: Fix test_tools reference leak (#98216)

test_tools.test_sundry() now uses an unittest mock to prevent the
logging module to register a real "atfork" function which kept the
logging module dictionary alive. So the logging module can be
properly unloaded. Previously, the logging module was loaded before
test_sundry(), but it's no longer the case since recent test_tools
sub-tests removals.
Lib/test/support/import_helper.py
Lib/test/test_importlib/test_threaded_import.py
Lib/test/test_tools/test_sundry.py