Skip to content

Commit d3efc6e

Browse files
committed
Ensure importlib.metadata tests do not leak references in sys.modules.
1 parent 63289b9 commit d3efc6e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_importlib/fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import functools
1010
import contextlib
1111

12+
from test.support import import_helper
1213
from test.support.os_helper import FS_NONASCII
1314
from test.support import requires_zlib
1415

@@ -85,6 +86,7 @@ def add_sys_path(dir):
8586
def setUp(self):
8687
super().setUp()
8788
self.fixtures.enter_context(self.add_sys_path(self.site_dir))
89+
self.fixtures.enter_context(import_helper.isolated_modules())
8890

8991

9092
class SiteBuilder(SiteDir):

0 commit comments

Comments
 (0)