diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2017-02-04 09:34:48 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2017-02-04 09:34:48 +0300 |
commit | 3821030b7ba4a7ff5d34c33deff4f6886130a951 (patch) | |
tree | 21dbd98647a8fa6937cc0de0a8d76947f7593ad6 /Lib/test/test_importlib/test_lazy.py | |
parent | acbb71ea58f932980f795e7582309fc2b33490eb (diff) | |
parent | 678487eb345f9f9dea3d3818ecad7d39145bdc65 (diff) | |
download | cpython-3821030b7ba4a7ff5d34c33deff4f6886130a951.tar.gz |
Issue #29198: Merge from 3.5
Diffstat (limited to 'Lib/test/test_importlib/test_lazy.py')
-rw-r--r-- | Lib/test/test_importlib/test_lazy.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py index cc383c286d..ffd8dc6cb0 100644 --- a/Lib/test/test_importlib/test_lazy.py +++ b/Lib/test/test_importlib/test_lazy.py @@ -66,6 +66,8 @@ class LazyLoaderTests(unittest.TestCase): spec = util.spec_from_loader(TestingImporter.module_name, util.LazyLoader(loader)) module = spec.loader.create_module(spec) + if module is None: + module = types.ModuleType(TestingImporter.module_name) module.__spec__ = spec module.__loader__ = spec.loader spec.loader.exec_module(module) |