summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test/extension/test_loader.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-03-10 05:17:37 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-03-10 05:17:37 (GMT)
commit2cf03a820483babd243a48de47865585fa697235 (patch)
tree8f568016f9c3bdc2c6be744ce65057b48c100e91 /Lib/importlib/test/extension/test_loader.py
parentd43b30b046ea151612494ed6d44aed3df71b480a (diff)
downloadcpython-2cf03a820483babd243a48de47865585fa697235.zip
cpython-2cf03a820483babd243a48de47865585fa697235.tar.gz
cpython-2cf03a820483babd243a48de47865585fa697235.tar.bz2
Implement importlib.util.set_loader: a decorator to automatically set
__loader__ on modules.
Diffstat (limited to 'Lib/importlib/test/extension/test_loader.py')
-rw-r--r--Lib/importlib/test/extension/test_loader.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/importlib/test/extension/test_loader.py b/Lib/importlib/test/extension/test_loader.py
index ca9f2a7..f961a63 100644
--- a/Lib/importlib/test/extension/test_loader.py
+++ b/Lib/importlib/test/extension/test_loader.py
@@ -24,6 +24,8 @@ class LoaderTests(abc.LoaderTests):
('__package__', '')]:
self.assertEqual(getattr(module, attr), value)
self.assert_(ext_util.NAME in sys.modules)
+ self.assert_(isinstance(module.__loader__,
+ importlib._ExtensionFileLoader))
def test_package(self):
# Extensions are not found in packages.