diff options
Diffstat (limited to 'Lib/importlib/test/source/test_case_sensitivity.py')
-rw-r--r-- | Lib/importlib/test/source/test_case_sensitivity.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/importlib/test/source/test_case_sensitivity.py b/Lib/importlib/test/source/test_case_sensitivity.py index 6649f377e1..955d6ec4e1 100644 --- a/Lib/importlib/test/source/test_case_sensitivity.py +++ b/Lib/importlib/test/source/test_case_sensitivity.py @@ -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) |