* Ensure importlib.metadata tests do not leak references in sys.modules.
* Move importlib.metadata tests to their own package for easier syncing with importlib_metadata.
* Update owners and makefile for new directories.
* Add blurb
Lib/test/test_module/ @ericsnowcurrently
Doc/c-api/module.rst @ericsnowcurrently
**/*importlib/resources/* @jaraco @warsaw @FFY00
-**/importlib/metadata/* @jaraco @warsaw
+**/*importlib/metadata/* @jaraco @warsaw
# Dates and times
**/*datetime* @pganssle @abalkin
import functools
import contextlib
+from test.support import import_helper
from test.support.os_helper import FS_NONASCII
from test.support import requires_zlib
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):
@requires_zlib()
class ZipFixtures:
- root = 'test.test_importlib.data'
+ root = 'test.test_importlib.metadata.data'
def _fixture_on_path(self, filename):
pkg_file = resources.files(self.root).joinpath(filename)
test/test_import/data/unwritable \
test/test_importlib \
test/test_importlib/builtin \
- test/test_importlib/data \
test/test_importlib/extension \
test/test_importlib/frozen \
test/test_importlib/import_ \
+ test/test_importlib/metadata \
+ test/test_importlib/metadata/data \
test/test_importlib/namespace_pkgs \
test/test_importlib/namespace_pkgs/both_portions \
test/test_importlib/namespace_pkgs/both_portions/foo \
--- /dev/null
+Consolidated tests for importlib.metadata in their own ``metadata`` package.