class_docstr: A test suite is a composite test consisting of a number of TestCases.
  
  For use, create an instance of TestSuite, then add test case instances.
  When all tests have been added, the suite can be passed to a test
  runner, such as TextTestRunner. It will run the individual test cases
  in the order in which they were added, aggregating the results. When
  subclassing, do not forget to call the base class constructor.
class_docstr_tok: ["A","test","suite","is","a","composite","test","consisting","of","a","number","of","TestCases",".","For","use",",","create","an","instance","of","TestSuite",",","then","add","test","case","instances",".","When","all","tests","have","been","added",",","the","suite","can","be","passed","to","a","test","runner",",","such","as","TextTestRunner",".","It","will","run","the","individual","test","cases","in","the","order","in","which","they","were","added",",","aggregating","the","results",".","When","subclassing",",","do","not","forget","to","call","the","base","class","constructor","."]
code: def _handleModuleTearDown(self, result):
      previousModule = self._get_previous_module(result)
      if previousModule is None:
          return
      if result._moduleSetUpFailed:
          return
  
      try:
          module = sys.modules[previousModule]
      except KeyError:
          return
  
      _call_if_exists(result, "_setupStdout")
      try:
          tearDownModule = getattr(module, "tearDownModule", None)
          if tearDownModule is not None:
              try:
                  tearDownModule()
              except Exception as e:
                  if isinstance(result, _DebugResult):
                      raise
                  self._createClassOrModuleLevelException(
                      result, e, "tearDownModule", previousModule
                  )
          try:
              case.doModuleCleanups()
          except Exception as e:
              if isinstance(result, _DebugResult):
                  raise
              self._createClassOrModuleLevelException(
                  result, e, "tearDownModule", previousModule
              )
      finally:
          _call_if_exists(result, "_restoreStdout")
  
imports: import sys
  from .None import case
  from .None import util
label_desc: Use image node_id 8 for calling the TestSuite obj's underlying member method code with example usage: obj._handleModuleTearDown(result) without return types