Skip to content

gh-95218: Move tests for importlib.resources into test_importlib.resources. #95219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Lib/test/cjkencodings/* noeol
Lib/test/coding20731.py noeol
Lib/test/decimaltestdata/*.decTest noeol
Lib/test/test_email/data/*.txt noeol
Lib/test/test_importlib/data01/* noeol
Lib/test/test_importlib/namespacedata01/* noeol
Lib/test/test_importlib/resources/data01/* noeol
Lib/test/test_importlib/resources/namespacedata01/* noeol
Lib/test/xmltestdata/* noeol

# CRLF files
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Python/pythonrun.c @iritkatriel
# bytecode.
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
**/importlib/resources/* @jaraco @warsaw @brettcannon
**/*importlib/resources/* @jaraco @warsaw @brettcannon
**/importlib/metadata/* @jaraco @warsaw

# Dates and times
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
wrap_spec,
)

from .resources import util
from . import util


class CompatibilityFilesTests(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from importlib import resources

from . import data01
from .resources import util
from . import util


class ContentsTests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from importlib import resources
from importlib.abc import Traversable
from . import data01
from .resources import util
from . import util


class FilesTests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from importlib import resources
from . import data01
from .resources import util
from . import util


class CommonBinaryTests(util.CommonTests, unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from importlib import resources
from . import data01
from .resources import util
from . import util


class CommonTests(util.CommonTests, unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from importlib import import_module, resources
from . import data01
from .resources import util
from . import util


class CommonBinaryTests(util.CommonTests, unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from . import data01
from . import zipdata01, zipdata02
from .resources import util
from . import util
from importlib import resources, import_module
from test.support import import_helper
from test.support.os_helper import unlink
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_importlib/resources/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import types
from pathlib import Path, PurePath

from .. import data01
from .. import zipdata01
from . import data01
from . import zipdata01
from importlib.abc import ResourceReader
from test.support import import_helper

Expand Down
24 changes: 12 additions & 12 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1926,15 +1926,6 @@ TESTSUBDIRS= distutils/tests \
test/test_importlib \
test/test_importlib/builtin \
test/test_importlib/data \
test/test_importlib/data01 \
test/test_importlib/data01/subdirectory \
test/test_importlib/data02 \
test/test_importlib/data02/one \
test/test_importlib/data02/two \
test/test_importlib/data03 \
test/test_importlib/data03/namespace \
test/test_importlib/data03/namespace/portion1 \
test/test_importlib/data03/namespace/portion2 \
test/test_importlib/extension \
test/test_importlib/frozen \
test/test_importlib/import_ \
Expand All @@ -1958,12 +1949,21 @@ TESTSUBDIRS= distutils/tests \
test/test_importlib/namespace_pkgs/project3 \
test/test_importlib/namespace_pkgs/project3/parent \
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespacedata01 \
test/test_importlib/partial \
test/test_importlib/resources \
test/test_importlib/resources/data01 \
test/test_importlib/resources/data01/subdirectory \
test/test_importlib/resources/data02 \
test/test_importlib/resources/data02/one \
test/test_importlib/resources/data02/two \
test/test_importlib/resources/data03 \
test/test_importlib/resources/data03/namespace \
test/test_importlib/resources/data03/namespace/portion1 \
test/test_importlib/resources/data03/namespace/portion2 \
test/test_importlib/resources/namespacedata01 \
test/test_importlib/resources/zipdata01 \
test/test_importlib/resources/zipdata02 \
test/test_importlib/source \
test/test_importlib/zipdata01 \
test/test_importlib/zipdata02 \
test/test_json \
test/test_lib2to3 \
test/test_lib2to3/data \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move tests for importlib.resources into test_importlib.resources.