docstr: Return a suite of all tests cases contained in the given module
  
  If the module is a package, load tests from all the modules in it.
  If the module has an ``additional_tests`` function, call it and add
  the return value to the tests.
docstr_tok: ["Return","a","suite","of","all","tests","cases","contained","in","the","given","module","If","the","module","is","a","package",",","load","tests","from","all","the","modules","in","it",".","If","the","module","has","an","``","additional_tests","``","function",",","call","it","and","add","the","return","value","to","the","tests","."]
code: def loadTestsFromModule(self, module, pattern=None):
      """Return a suite of all tests cases contained in the given module
  
      If the module is a package, load tests from all the modules in it.
      If the module has an ``additional_tests`` function, call it and add
      the return value to the tests.
      """
      if module in self._visited:
          return None
      self._visited.add(module)
  
      tests = []
      tests.append(TestLoader.loadTestsFromModule(self, module))
  
      if hasattr(module, "additional_tests"):
          tests.append(module.additional_tests())
  
      if hasattr(module, "__path__"):
          for file in resource_listdir(module.__name__, ""):
              if file.endswith(".py") and file != "__init__.py":
                  submodule = module.__name__ + "." + file[:-3]
              else:
                  if resource_exists(
                      module.__name__, file + "/__init__.py"
                  ):
                      submodule = module.__name__ + "." + file
                  else:
                      continue
              tests.append(self.loadTestsFromName(submodule))
  
      if len(tests) != 1:
          return self.suiteClass(tests)
      else:
          return tests[0]
  
imports: import os
  import operator
  import sys
  import contextlib
  import itertools
  import unittest
  from distutils.errors import DistutilsError, DistutilsOptionError
  from distutils import log
  from unittest import TestLoader
  from setuptools.extern import six
  from setuptools.extern.six.moves import map, filter
  from pkg_resources import resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint
  from setuptools import Command
  from .build_py import _unique_everseen
label_desc: Use image node_id 2 for calling the ScanningLoader obj's underlying member method code with example usage: obj.loadTestsFromModule(module, pattern) and returns: None, self, tests