mirror of
https://github.com/python/cpython.git
synced 2025-10-28 04:04:44 +00:00
Issue #19721: Consolidate test_importlib utility code into a single
module.
This commit is contained in:
parent
91795c8e34
commit
732ac654c8
25 changed files with 249 additions and 270 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from .. import util as test_util
|
||||
from . import util
|
||||
from .. import util
|
||||
|
||||
machinery = test_util.import_importlib('importlib.machinery')
|
||||
machinery = util.import_importlib('importlib.machinery')
|
||||
|
||||
import collections
|
||||
import sys
|
||||
|
|
@ -22,9 +21,9 @@ def hook(self, entry):
|
|||
def test_success(self):
|
||||
# Path hook should handle a directory where a known extension module
|
||||
# exists.
|
||||
self.assertTrue(hasattr(self.hook(util.PATH), 'find_module'))
|
||||
self.assertTrue(hasattr(self.hook(util.EXTENSIONS.path), 'find_module'))
|
||||
|
||||
Frozen_PathHooksTests, Source_PathHooksTests = test_util.test_both(
|
||||
Frozen_PathHooksTests, Source_PathHooksTests = util.test_both(
|
||||
PathHookTests, machinery=machinery)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue