diff options
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/cmdline.py | 2 | ||||
-rw-r--r-- | coverage/data.py | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 0620c8ee..1a8a0268 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -589,7 +589,7 @@ class CoverageScript(object): print(info_header("data")) print("path: %s" % self.coverage.data.filename) print("has_arcs: %r" % self.coverage.data.has_arcs()) - summary = self.coverage.data.summary(fullpath=True) + summary = self.coverage.data.line_counts(fullpath=True) if summary: plugins = self.coverage.data.plugin_data() filenames = sorted(summary.keys()) diff --git a/coverage/data.py b/coverage/data.py index c9e9a036..0f9a4cfd 100644 --- a/coverage/data.py +++ b/coverage/data.py @@ -213,13 +213,18 @@ class CoverageData(object): hasher.update(self.lines(filename)) hasher.update(self.arcs(filename)) - def summary(self, fullpath=False): - """Return a dict summarizing the coverage data. + def line_counts(self, fullpath=False): + """Return a dict summarizing the line coverage data. Keys are based on the filenames, and values are the number of executed lines. If `fullpath` is true, then the keys are the full pathnames of the files, otherwise they are the basenames of the files. + This is used for testing, not for actual use in the product. + + Returns: + dict mapping filenames to counts of lines. + """ summ = {} if fullpath: |