def test_module(self):
    with util.create_modules('_temp') as mapping:
        loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
        with warnings.catch_warnings():
            warnings.simplefilter('ignore', DeprecationWarning)
            module = loader.load_module('_temp')
        self.assertIn('_temp', sys.modules)
        check = {'__name__': '_temp', '__file__': mapping['_temp'], '__package__': ''}
        for (attr, value) in check.items():
            self.assertEqual(getattr(module, attr), value)
def test_module(self):
    with util.create_modules('_temp') as mapping:
        loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
        with warnings.catch_warnings():
            warnings.simplefilter('ignore', DeprecationWarning)
            module = loader.load_module('_temp')
        self.assertIn('_temp', sys.modules)
        check = {'__name__': '_temp', '__file__': mapping['_temp'], '__package__': }
        for (attr, value) in check.items():
            self.assertEqual(getattr(module, attr), value)