mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue