]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Mar 2024 23:33:23 +0000 (00:33 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Mar 2024 23:33:23 +0000 (19:33 -0400)
commitf9d1ec8e803012a521f0673da8c5cba1e9862bf5
tree1a060e879f57f17eadcbe6b4457ca351519e8b21
parent65c6620a3aa677ed1315f6ebec134aedf65664c2
[3.12] gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680) (#116684)

gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680)
(cherry picked from commit a2548077614f81f25a2c3465dabb7a0a3885c40c)

gh-116307: Create a new import helper 'isolated modules' and use that instead of 'Clean Import' to ensure that tests from importlib_resources don't leave modules in sys.modules.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Lib/test/support/import_helper.py
Lib/test/test_importlib/resources/test_files.py
Misc/NEWS.d/next/Tests/2024-03-06-11-00-36.gh-issue-116307.Uij0t_.rst [new file with mode: 0644]