Move importlib completely over to using rpartition and accepting the empty

string for top-level modules.
This commit is contained in:
Brett Cannon 2009-02-07 01:52:25 +00:00
parent d94e558fdc
commit 06c9d96b70
4 changed files with 22 additions and 15 deletions

View file

@ -23,7 +23,7 @@ class SimpleTest(unittest.TestCase):
module = loader.load_module('_temp')
self.assert_('_temp' in sys.modules)
check = {'__name__': '_temp', '__file__': mapping['_temp'],
'__package__': None}
'__package__': ''}
for attr, value in check.items():
self.assertEqual(getattr(module, attr), value)