def METHOD_NAME(self):
    def __init__():
        from ..subpkg import module
        1/0
    mock = util.mock_spec('pkg.__init__', 'pkg.subpkg.__init__',
                             'pkg.subpkg.module',
                             module_code={'pkg.subpkg': __init__})
    with mock:
        with util.import_state(meta_path=[mock]):
            with self.assertRaises((ZeroDivisionError, ImportError)):
                # This raises ImportError on the "from ..subpkg import module"
                # line, not sure why.
                self.__import__('pkg.subpkg')
            self.assertNotIn('pkg.subpkg', sys.modules)
            with self.assertRaises((ZeroDivisionError, ImportError)):
                self.__import__('pkg.subpkg.module')
            self.assertNotIn('pkg.subpkg', sys.modules)
            # XXX False
            #self.assertIn('pkg.subpkg.module', sys.modules)