class_docstr: Importing a submodule should import the parent modules.
code: def test_raising_parent_after_relative_importing_child(self):
      def __init__():
          from . import module
  
          1 / 0
  
      mock = util.mock_spec(
          "pkg.__init__", "pkg.module", module_code={"pkg": __init__}
      )
      with mock:
          with util.import_state(meta_path=[mock]):
              with self.assertRaises((ZeroDivisionError, ImportError)):
                  # This raises ImportError on the "from . import module"
                  # line, not sure why.
                  self.__import__("pkg")
              self.assertNotIn("pkg", sys.modules)
              with self.assertRaises((ZeroDivisionError, ImportError)):
                  self.__import__("pkg.module")
              self.assertNotIn("pkg", sys.modules)
  
file_path: cpython/Lib/test/test_importlib/import_/test_packages.py
imports: from test.test_importlib import util
  import sys
  import unittest
  from test.support import import_helper
label_desc: Use image node_id 4 for calling the ParentModuleTests obj's underlying member method code with example usage: obj.test_raising_parent_after_relative_importing_child() without return types