diff options
author | Brett Cannon <brett@python.org> | 2014-05-09 18:32:57 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-05-09 18:32:57 (GMT) |
commit | 732ac654c8a3e5f9048a53efaee7380e1775a630 (patch) | |
tree | 29f2569faa5c7c968c3201b8074dc32f6fe06d5f /Lib/test/test_importlib/source/test_source_encoding.py | |
parent | 91795c8e34cdae5616b4dd56fe616476dfdc1267 (diff) | |
download | cpython-732ac654c8a3e5f9048a53efaee7380e1775a630.zip cpython-732ac654c8a3e5f9048a53efaee7380e1775a630.tar.gz cpython-732ac654c8a3e5f9048a53efaee7380e1775a630.tar.bz2 |
Issue #19721: Consolidate test_importlib utility code into a single
module.
Diffstat (limited to 'Lib/test/test_importlib/source/test_source_encoding.py')
-rw-r--r-- | Lib/test/test_importlib/source/test_source_encoding.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_importlib/source/test_source_encoding.py b/Lib/test/test_importlib/source/test_source_encoding.py index c62dfa1..28c75db 100644 --- a/Lib/test/test_importlib/source/test_source_encoding.py +++ b/Lib/test/test_importlib/source/test_source_encoding.py @@ -1,5 +1,4 @@ from .. import util -from . import util as source_util machinery = util.import_importlib('importlib.machinery') @@ -37,7 +36,7 @@ class EncodingTest: module_name = '_temp' def run_test(self, source): - with source_util.create_modules(self.module_name) as mapping: + with util.create_modules(self.module_name) as mapping: with open(mapping[self.module_name], 'wb') as file: file.write(source) loader = self.machinery.SourceFileLoader(self.module_name, @@ -120,7 +119,7 @@ class LineEndingTest: module_name = '_temp' source_lines = [b"a = 42", b"b = -13", b''] source = line_ending.join(source_lines) - with source_util.create_modules(module_name) as mapping: + with util.create_modules(module_name) as mapping: with open(mapping[module_name], 'wb') as file: file.write(source) loader = self.machinery.SourceFileLoader(module_name, |