parameters: (host_driven_test_root, is_official_build)
return_statement: return test_module_list
docstring: Retrieve a list of python modules that match the testing naming scheme.
  
    Walks the location of host-driven tests, imports them, and provides the list
    of imported modules to the caller.
  
    Args:
      host_driven_test_root: The path to walk, looking for the
          pythonDrivenTests or host_driven_tests directory
      is_official_build: Whether to run only those tests marked 'official'
  
    Returns:
      A list of python modules under |host_driven_test_root| which match the
      testing naming scheme. Each module should define one or more classes that
      derive from HostDrivenTestCase.
docstring_summary: Retrieve a list of python modules that match the testing naming scheme.
docstring_tokens: Retrieve a list of python modules that match the testing naming scheme .
function: def _GetTestModules(host_driven_test_root, is_official_build):
    """Retrieve a list of python modules that match the testing naming scheme.
  
    Walks the location of host-driven tests, imports them, and provides the list
    of imported modules to the caller.
  
    Args:
      host_driven_test_root: The path to walk, looking for the
          pythonDrivenTests or host_driven_tests directory
      is_official_build: Whether to run only those tests marked 'official'
  
    Returns:
      A list of python modules under |host_driven_test_root| which match the
      testing naming scheme. Each module should define one or more classes that
      derive from HostDrivenTestCase.
    """
    # By default run all host-driven tests under pythonDrivenTests or
    # host_driven_tests.
    host_driven_test_file_list = []
    for root, _, files in os.walk(host_driven_test_root):
      if (root.endswith('host_driven_tests') or
          root.endswith('pythonDrivenTests') or
          (is_official_build and (root.endswith('pythonDrivenTests/official') or
                                  root.endswith('host_driven_tests/official')))):
        host_driven_test_file_list += _GetPythonFiles(root, files)
    host_driven_test_file_list.sort()
  
    test_module_list = [_GetModuleFromFile(test_file)
                        for test_file in host_driven_test_file_list]
    return test_module_list
function_tokens: def _GetTestModules ( host_driven_test_root , is_official_build ) : # By default run all host-driven tests under pythonDrivenTests or # host_driven_tests. host_driven_test_file_list = [ ] for root , _ , files in os . walk ( host_driven_test_root ) : if ( root . endswith ( 'host_driven_tests' ) or root . endswith ( 'pythonDrivenTests' ) or ( is_official_build and ( root . endswith ( 'pythonDrivenTests/official' ) or root . endswith ( 'host_driven_tests/official' ) ) ) ) : host_driven_test_file_list += _GetPythonFiles ( root , files ) host_driven_test_file_list . sort ( ) test_module_list = [ _GetModuleFromFile ( test_file ) for test_file in host_driven_test_file_list ] return test_module_list