class_docstr: This class is responsible for loading tests according to various criteria
  and returning them wrapped in a TestSuite
class_docstr_tok: ["This","class","is","responsible","for","loading","tests","according","to","various","criteria","and","returning","them","wrapped","in","a","TestSuite"]
docstr: Return a suite of all test cases contained in the given module
docstr_tok: ["Return","a","suite","of","all","test","cases","contained","in","the","given","module"]
code: def loadTestsFromModule(self, module, *, pattern=None):
      """Return a suite of all test cases contained in the given module"""
      tests = []
      for name in dir(module):
          obj = getattr(module, name)
          if (
              isinstance(obj, type)
              and issubclass(obj, case.TestCase)
              and obj not in (case.TestCase, case.FunctionTestCase)
          ):
              tests.append(self.loadTestsFromTestCase(obj))
  
      load_tests = getattr(module, "load_tests", None)
      tests = self.suiteClass(tests)
      if load_tests is not None:
          try:
              return load_tests(self, tests, pattern)
          except Exception as e:
              error_case, error_message = _make_failed_load_tests(
                  module.__name__, e, self.suiteClass
              )
              self.errors.append(error_message)
              return error_case
      return tests
  
imports: import os
  import re
  import sys
  import traceback
  import types
  import functools
  from fnmatch import fnmatch, fnmatchcase
  from .None import case, suite, util
label_desc: Use image node_id 3 for calling the TestLoader obj's underlying member method code with example usage: obj.loadTestsFromModule(module) and returns: tests, load_tests, error_case