Skip to content

Commit adc4b12

Browse files
committed
Ensure tests do not leak references in sys.modules.
1 parent 07d894d commit adc4b12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/fixtures.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import functools
1010
import contextlib
1111

12+
from .compat.py312 import import_helper
1213
from .compat.py39 import os_helper
1314

1415
from . import _path
@@ -84,6 +85,7 @@ def add_sys_path(dir):
8485
def setUp(self):
8586
super().setUp()
8687
self.fixtures.enter_context(self.add_sys_path(self.site_dir))
88+
self.fixtures.enter_context(import_helper.isolated_modules())
8789

8890

8991
class SiteBuilder(SiteDir):

0 commit comments

Comments
 (0)