Mercurial > cpython-lru_cache-weakref
diff Lib/importlib/test/source/test_source_encoding.py @ 51234:4b3246c83e3f
Split out support code that is specific to source tests out of
importlib.test.support to importlib.test.source.util.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Sun, 01 Feb 2009 03:08:31 +0000 |
| parents | aac51b70c74c |
| children | d85ef26efd10 |
line wrap: on
line diff
--- a/Lib/importlib/test/source/test_source_encoding.py Sun Feb 01 02:05:11 2009 +0000 +++ b/Lib/importlib/test/source/test_source_encoding.py Sun Feb 01 03:08:31 2009 +0000 @@ -1,5 +1,6 @@ import importlib from .. import support +from . import util as source_util import codecs import re @@ -32,7 +33,7 @@ module_name = '_temp' def run_test(self, source): - with support.create_modules(self.module_name) as mapping: + with source_util.create_modules(self.module_name) as mapping: with open(mapping[self.module_name], 'wb')as file: file.write(source) loader = importlib._PyFileLoader(self.module_name, @@ -93,7 +94,7 @@ module_name = '_temp' source_lines = [b"a = 42", b"b = -13", b''] source = line_ending.join(source_lines) - with support.create_modules(module_name) as mapping: + with source_util.create_modules(module_name) as mapping: with open(mapping[module_name], 'wb') as file: file.write(source) loader = importlib._PyFileLoader(module_name, mapping[module_name],
