diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2016-08-21 07:43:58 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2016-08-21 07:43:58 (GMT) |
commit | cbcd221de4f13a855ba37d48a238895e4ddc92f4 (patch) | |
tree | 07b1b549e44c6feeeec8ebd4cd6d03642a7b1932 /Lib/test/test_importlib/extension | |
parent | f9ed528fafafda147f20f345195ced23b141ace9 (diff) | |
parent | 8682f578c1c8fd0486c886b001729907a5409a9f (diff) | |
download | cpython-cbcd221de4f13a855ba37d48a238895e4ddc92f4.zip cpython-cbcd221de4f13a855ba37d48a238895e4ddc92f4.tar.gz cpython-cbcd221de4f13a855ba37d48a238895e4ddc92f4.tar.bz2 |
Merge #27782 fix from 3.5
Diffstat (limited to 'Lib/test/test_importlib/extension')
-rw-r--r-- | Lib/test/test_importlib/extension/test_loader.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py index 154a793..8d20040 100644 --- a/Lib/test/test_importlib/extension/test_loader.py +++ b/Lib/test/test_importlib/extension/test_loader.py @@ -212,6 +212,15 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests): self.assertNotEqual(type(mod), type(unittest)) self.assertEqual(mod.three, 3) + # issue 27782 + def test_nonmodule_with_methods(self): + '''Test creating a non-module object with methods defined''' + name = self.name + '_nonmodule_with_methods' + mod = self.load_module_by_name(name) + self.assertNotEqual(type(mod), type(unittest)) + self.assertEqual(mod.three, 3) + self.assertEqual(mod.bar(10, 1), 9) + def test_null_slots(self): '''Test that NULL slots aren't a problem''' name = self.name + '_null_slots' |