summaryrefslogtreecommitdiff
path: root/coverage/data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-07-16 15:41:15 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-07-16 15:41:15 -0400
commit73d5eab6fe1178edecc3eee7645a897db5b8c81f (patch)
tree9e86e4ebc1b004d7951b8ed70e609d9e23fff67d /coverage/data.py
parent5a609b662e97b1a3728467d2056ca63e3984af75 (diff)
downloadpython-coveragepy-git-73d5eab6fe1178edecc3eee7645a897db5b8c81f.tar.gz
Change CoverageData.summary() to CoverageData.line_counts()
Diffstat (limited to 'coverage/data.py')
-rw-r--r--coverage/data.py9
1 files changed, 7 insertions, 2 deletions
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: