mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Merge fix for issue #24285 from 3.5
This commit is contained in:
commit
06f155f488
3 changed files with 13 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue