summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-02-21 02:35:41 (GMT)
committerBrett Cannon <brett@python.org>2016-02-21 02:35:41 (GMT)
commit558823a0cf7834cb8bc45123604008e33b4e69e2 (patch)
tree9f381020ea9dca25831e6fcea2aa63d76b9189e9 /Lib/test/test_importlib
parent4f38cb41fe022c94bb5569c72d8b48020d8c13d4 (diff)
downloadcpython-558823a0cf7834cb8bc45123604008e33b4e69e2.zip
cpython-558823a0cf7834cb8bc45123604008e33b4e69e2.tar.gz
cpython-558823a0cf7834cb8bc45123604008e33b4e69e2.tar.bz2
Issue #26186: Remove an invalid type check in
importlib.util.LazyLoader. The class was checking its argument as to whether its implementation of create_module() came directly from importlib.abc.Loader. The problem is that the classes coming from imoprtlib.machinery do not directly inherit from the ABC as they come from _frozen_importlib. Because the documentation has always said that create_module() was ignored, the check has simply been removed.
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/test_lazy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py
index 2e191bb..774b7a4 100644
--- a/Lib/test/test_importlib/test_lazy.py
+++ b/Lib/test/test_importlib/test_lazy.py
@@ -54,6 +54,7 @@ class LazyLoaderTests(unittest.TestCase):
def test_init(self):
with self.assertRaises(TypeError):
+ # Classes that dono't define exec_module() trigger TypeError.
util.LazyLoader(object)
def new_module(self, source_code=None):