Implement importlib.util.set_loader: a decorator to automatically set

__loader__ on modules.
This commit is contained in:
Brett Cannon 2009-03-10 05:17:37 +00:00
parent d43b30b046
commit 2cf03a8204
7 changed files with 34 additions and 12 deletions

View file

@ -15,7 +15,8 @@ class LoaderTests(abc.LoaderTests):
assert 'errno' in sys.builtin_module_names
name = 'errno'
verification = {'__name__': 'errno', '__package__': ''}
verification = {'__name__': 'errno', '__package__': '',
'__loader__': machinery.BuiltinImporter}
def verify(self, module):
"""Verify that the module matches against what it should have."""