tools/code_coverage/coverage_utils.py
def CalculatePerDirectoryCoverageSummary(self, per_file_coverage_summary):
    """Calculates per directory coverage summary."""
    logging.debug('Calculating per-directory coverage summary.')
    per_directory_coverage_summary = defaultdict(lambda: CoverageSummary())

    for file_path in per_file_coverage_summary:
      summary = per_file_coverage_summary[file_path]
      parent_dir = os.path.dirname(file_path)

      while True:
        per_directory_coverage_summary[parent_dir].AddSummary(summary)

        if os.path.normpath(parent_dir) == os.path.normpath(self.src_root_dir):
          break
        parent_dir = os.path.dirname(parent_dir)

    logging.debug('Finished calculating per-directory coverage summary.')
    return per_directory_coverage_summary
Calculates per directory coverage summary.
Calculates per directory coverage summary.
Calculates per directory coverage summary .
def CalculatePerDirectoryCoverageSummary(self, per_file_coverage_summary):
    logging.debug('Calculating per-directory coverage summary.')
    per_directory_coverage_summary = defaultdict(lambda: CoverageSummary())
    for file_path in per_file_coverage_summary:
      summary = per_file_coverage_summary[file_path]
      parent_dir = os.path.dirname(file_path)
      while True:
        per_directory_coverage_summary[parent_dir].AddSummary(summary)
        if os.path.normpath(parent_dir) == os.path.normpath(self.src_root_dir):
          break
        parent_dir = os.path.dirname(parent_dir)
    logging.debug('Finished calculating per-directory coverage summary.')
    return per_directory_coverage_summary
def CalculatePerDirectoryCoverageSummary ( self , per_file_coverage_summary ) : logging . debug ( 'Calculating per-directory coverage summary.' ) per_directory_coverage_summary = defaultdict ( lambda : CoverageSummary ( ) ) for file_path in per_file_coverage_summary : summary = per_file_coverage_summary [ file_path ] parent_dir = os . path . dirname ( file_path ) while True : per_directory_coverage_summary [ parent_dir ] . AddSummary ( summary ) if os . path . normpath ( parent_dir ) == os . path . normpath ( self . src_root_dir ) : break parent_dir = os . path . dirname ( parent_dir ) logging . debug ( 'Finished calculating per-directory coverage summary.' ) return per_directory_coverage_summary
Calculates per directory coverage summary.
Calculates per directory coverage summary .
"""Calculates per directory coverage summary."""
self
per_file_coverage_summary