'Test loading an extension module'

def test_module(self):

    with util.uncache(self.name):
        module = self.load_module()
        for (attr, value) in [('__name__', self.name), ('__file__', self.spec.origin), ('__package__', '')]:
            self.assertEqual(getattr(module, attr), value)
        with self.assertRaises(AttributeError):
            module.__path__
        self.assertIs(module, sys.modules[self.name])
        self.assertIsInstance(module.__loader__, self.machinery.ExtensionFileLoader)
