mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Implement importlib.util.set_loader: a decorator to automatically set
__loader__ on modules.
This commit is contained in:
parent
d43b30b046
commit
2cf03a8204
7 changed files with 34 additions and 12 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue