Skip to content

Commit

Permalink
Ensure tests do not leak references in sys.modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 20, 2024
1 parent 07d894d commit adc4b12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import functools
import contextlib

from .compat.py312 import import_helper
from .compat.py39 import os_helper

from . import _path
Expand Down Expand Up @@ -84,6 +85,7 @@ def add_sys_path(dir):
def setUp(self):
super().setUp()
self.fixtures.enter_context(self.add_sys_path(self.site_dir))
self.fixtures.enter_context(import_helper.isolated_modules())


class SiteBuilder(SiteDir):
Expand Down

0 comments on commit adc4b12

Please sign in to comment.