summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2015-05-26 11:57:16 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2015-05-26 11:57:16 (GMT)
commit06f155f4884dff99bfd72a38d8930449a24cbf28 (patch)
tree97306a23aaae938a6ca63460b6487a36e986d69b /Lib
parentc074e9d765505df971fc89e21d512b40f85e1d6b (diff)
parent55871f04bf0ac1cf0c7b1efd82780b4bf979d4f0 (diff)
downloadcpython-06f155f4884dff99bfd72a38d8930449a24cbf28.zip
cpython-06f155f4884dff99bfd72a38d8930449a24cbf28.tar.gz
cpython-06f155f4884dff99bfd72a38d8930449a24cbf28.tar.bz2
Merge fix for issue #24285 from 3.5
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_importlib/extension/test_loader.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py
index 66ac2b1..5813ade 100644
--- a/Lib/test/test_importlib/extension/test_loader.py
+++ b/Lib/test/test_importlib/extension/test_loader.py
@@ -170,6 +170,13 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests):
loader.exec_module(module)
return module
+ def test_load_submodule(self):
+ '''Test loading a simulated submodule'''
+ module = self.load_module_by_name('pkg.' + self.name)
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, 'pkg.' + self.name)
+ self.assertEqual(module.str_const, 'something different')
+
def test_load_twice(self):
'''Test that 2 loads result in 2 module objects'''
module1 = self.load_module_by_name(self.name)