summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/resources/test_files.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2024-03-12 21:36:21 (GMT)
committerGitHub <noreply@github.com>2024-03-12 21:36:21 (GMT)
commita2548077614f81f25a2c3465dabb7a0a3885c40c (patch)
tree07e48c359d022f298751bfd801b94c529226b20c /Lib/test/test_importlib/resources/test_files.py
parentbb66600558cb8d5dd9a56f562bd9531eb1e1685f (diff)
downloadcpython-a2548077614f81f25a2c3465dabb7a0a3885c40c.zip
cpython-a2548077614f81f25a2c3465dabb7a0a3885c40c.tar.gz
cpython-a2548077614f81f25a2c3465dabb7a0a3885c40c.tar.bz2
gh-116307: Proper fix for 'mod' leaking across importlib tests (#116680)
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.
Diffstat (limited to 'Lib/test/test_importlib/resources/test_files.py')
-rw-r--r--Lib/test/test_importlib/resources/test_files.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/resources/test_files.py b/Lib/test/test_importlib/resources/test_files.py
index 1450cfb..26c8b04 100644
--- a/Lib/test/test_importlib/resources/test_files.py
+++ b/Lib/test/test_importlib/resources/test_files.py
@@ -70,7 +70,7 @@ class SiteDir:
self.addCleanup(self.fixtures.close)
self.site_dir = self.fixtures.enter_context(os_helper.temp_dir())
self.fixtures.enter_context(import_helper.DirsOnSysPath(self.site_dir))
- self.fixtures.enter_context(import_helper.CleanImport())
+ self.fixtures.enter_context(import_helper.isolated_modules())
class ModulesFilesTests(SiteDir, unittest.TestCase):