Skip to content

Commit

Permalink
pythongh-117089: Move importlib.metadata tests to their own package (p…
Browse files Browse the repository at this point in the history
…ython#117092)

* 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
  • Loading branch information
jaraco authored and diegorusso committed Apr 17, 2024
1 parent b70389c commit 14b08e3
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Python/dynload_*.c @ericsnowcurrently
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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import functools
import contextlib

from test.support import import_helper
from test.support.os_helper import FS_NONASCII
from test.support import requires_zlib

Expand Down Expand Up @@ -85,6 +86,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 Expand Up @@ -348,7 +350,7 @@ def DALS(str):

@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)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -2351,10 +2351,11 @@ TESTSUBDIRS= idlelib/idle_test \
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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Consolidated tests for importlib.metadata in their own ``metadata`` package.

0 comments on commit 14b08e3

Please sign in to comment.