mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Move importlib completely over to using rpartition and accepting the empty
string for top-level modules.
This commit is contained in:
parent
d94e558fdc
commit
06c9d96b70
4 changed files with 22 additions and 15 deletions
|
|
@ -21,7 +21,8 @@ class LoaderTests(abc.LoaderTests):
|
|||
with util.uncache(test_path_hook.NAME):
|
||||
module = self.load_module(test_path_hook.NAME)
|
||||
for attr, value in [('__name__', test_path_hook.NAME),
|
||||
('__file__', test_path_hook.FILEPATH)]:
|
||||
('__file__', test_path_hook.FILEPATH),
|
||||
('__package__', '')]:
|
||||
self.assertEqual(getattr(module, attr), value)
|
||||
self.assert_(test_path_hook.NAME in sys.modules)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue