Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-94217: Skip import tests when _testcapi is a builtin#94218

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
miss-islington merged 1 commit intopython:mainfromtiran:gh-94217
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes fromall 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
6 changes: 5 additions & 1 deletionLib/test/test_importlib/extension/test_finder.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
machinery = util.import_importlib('importlib.machinery')

import unittest
importwarnings
importsys


class FinderTests(abc.FinderTests):
Expand All@@ -13,6 +13,10 @@ class FinderTests(abc.FinderTests):
def setUp(self):
if not self.machinery.EXTENSION_SUFFIXES:
raise unittest.SkipTest("Requires dynamic loading support.")
if util.EXTENSIONS.name in sys.builtin_module_names:
raise unittest.SkipTest(
f"{util.EXTENSIONS.name} is a builtin module"
)

def find_spec(self, fullname):
importer = self.machinery.FileFinder(util.EXTENSIONS.path,
Expand Down
8 changes: 8 additions & 0 deletionsLib/test/test_importlib/extension/test_loader.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,10 @@ class LoaderTests(abc.LoaderTests):
def setUp(self):
if not self.machinery.EXTENSION_SUFFIXES:
raise unittest.SkipTest("Requires dynamic loading support.")
if util.EXTENSIONS.name in sys.builtin_module_names:
raise unittest.SkipTest(
f"{util.EXTENSIONS.name} is a builtin module"
)
self.loader = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name,
util.EXTENSIONS.file_path)

Expand DownExpand Up@@ -97,6 +101,10 @@ def setUp(self):
if not self.machinery.EXTENSION_SUFFIXES:
raise unittest.SkipTest("Requires dynamic loading support.")
self.name = '_testmultiphase'
if self.name in sys.builtin_module_names:
raise unittest.SkipTest(
f"{self.name} is a builtin module"
)
finder = self.machinery.FileFinder(None)
self.spec = importlib.util.find_spec(self.name)
assert self.spec
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp