mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Split out support code that is specific to source tests out of
importlib.test.support to importlib.test.source.util.
This commit is contained in:
parent
30b047dc35
commit
4ee2cdaf65
8 changed files with 123 additions and 113 deletions
|
|
@ -1,6 +1,7 @@
|
|||
"""Test case-sensitivity (PEP 235)."""
|
||||
import importlib
|
||||
from .. import support
|
||||
from . import util as source_util
|
||||
import os
|
||||
import sys
|
||||
from test import support as test_support
|
||||
|
|
@ -25,7 +26,8 @@ class CaseSensitivityTest(unittest.TestCase):
|
|||
"""Look for a module with matching and non-matching sensitivity."""
|
||||
sensitive_pkg = 'sensitive.{0}'.format(self.name)
|
||||
insensitive_pkg = 'insensitive.{0}'.format(self.name.lower())
|
||||
with support.create_modules(insensitive_pkg, sensitive_pkg) as mapping:
|
||||
context = source_util.create_modules(insensitive_pkg, sensitive_pkg)
|
||||
with context as mapping:
|
||||
sensitive_path = os.path.join(mapping['.root'], 'sensitive')
|
||||
insensitive_path = os.path.join(mapping['.root'], 'insensitive')
|
||||
return self.find(sensitive_path), self.find(insensitive_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue