mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Factor out helper code from importlib.test.extension.test_path_hook.
This commit is contained in:
parent
36d1f3eb41
commit
534b2cd176
6 changed files with 21 additions and 42 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import importlib
|
||||
from .. import abc
|
||||
from . import test_path_hook
|
||||
from . import util
|
||||
|
||||
import unittest
|
||||
|
||||
|
|
@ -9,11 +9,11 @@ class FinderTests(abc.FinderTests):
|
|||
"""Test the finder for extension modules."""
|
||||
|
||||
def find_module(self, fullname):
|
||||
importer = importlib.ExtensionFileImporter(test_path_hook.PATH)
|
||||
importer = importlib.ExtensionFileImporter(util.PATH)
|
||||
return importer.find_module(fullname)
|
||||
|
||||
def test_module(self):
|
||||
self.assert_(self.find_module(test_path_hook.NAME))
|
||||
self.assert_(self.find_module(util.NAME))
|
||||
|
||||
def test_package(self):
|
||||
# Extension modules cannot be an __init__ for a package.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue