mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[3.11] GH-102700: allow built-in modules to be submodules (GH-103162) (GH-103322)
GH-102700: allow built-in modules to be submodules (GH-103162)
(cherry picked from commit 5d08c3ff7d
)
Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
parent
58e330ac9c
commit
123680f9aa
3 changed files with 1 additions and 19 deletions
|
@ -37,13 +37,6 @@ class FindSpecTests(abc.FinderTests):
|
|||
spec = self.machinery.BuiltinImporter.find_spec(name)
|
||||
self.assertIsNone(spec)
|
||||
|
||||
def test_ignore_path(self):
|
||||
# The value for 'path' should always trigger a failed import.
|
||||
with util.uncache(util.BUILTINS.good_name):
|
||||
spec = self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name,
|
||||
['pkg'])
|
||||
self.assertIsNone(spec)
|
||||
|
||||
|
||||
(Frozen_FindSpecTests,
|
||||
Source_FindSpecTests
|
||||
|
@ -77,16 +70,6 @@ class FinderTests(abc.FinderTests):
|
|||
loader = self.machinery.BuiltinImporter.find_module('importlib')
|
||||
self.assertIsNone(loader)
|
||||
|
||||
def test_ignore_path(self):
|
||||
# The value for 'path' should always trigger a failed import.
|
||||
with util.uncache(util.BUILTINS.good_name):
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
loader = self.machinery.BuiltinImporter.find_module(
|
||||
util.BUILTINS.good_name,
|
||||
['pkg'])
|
||||
self.assertIsNone(loader)
|
||||
|
||||
|
||||
(Frozen_FinderTests,
|
||||
Source_FinderTests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue