summaryrefslogtreecommitdiff
path: root/coverage/data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-07-14 05:39:50 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-07-14 05:39:50 -0400
commitd4652ca5603d9c1f5df9f8cac856ce06332502f3 (patch)
tree81e07fa8307c64db9b94de746468f8d1ed87aef0 /coverage/data.py
parent20e59fb2eb6a9dcc513e34b56c0e6cb523777ce7 (diff)
downloadpython-coveragepy-git-d4652ca5603d9c1f5df9f8cac856ce06332502f3.tar.gz
is better than
Diffstat (limited to 'coverage/data.py')
-rw-r--r--coverage/data.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/coverage/data.py b/coverage/data.py
index 975c0384..fb0fdb97 100644
--- a/coverage/data.py
+++ b/coverage/data.py
@@ -77,11 +77,11 @@ class CoverageData(object):
self._arcs = {}
self._plugins = {}
- def line_data(self, filename):
+ def lines(self, filename):
"""Get the list of lines executed for a file."""
return list((self._lines.get(filename) or {}).keys())
- def arc_data(self, filename):
+ def arcs(self, filename):
"""Get the list of arcs executed for a file."""
return list((self._arcs.get(filename) or {}).keys())
@@ -182,7 +182,8 @@ class CoverageData(object):
self._plugins.update(plugin_data)
def update(self, other_data, aliases=None):
- """
+ """Update this data with data from another `CoverageData`.
+
If `aliases` is provided, it's a `PathAliases` object that is used to
re-map paths to match the local machine's.
@@ -206,8 +207,8 @@ class CoverageData(object):
def add_to_hash(self, filename, hasher):
"""Contribute `filename`'s data to the Md5Hash `hasher`."""
- hasher.update(self.line_data(filename))
- hasher.update(self.arc_data(filename))
+ hasher.update(self.lines(filename))
+ hasher.update(self.arcs(filename))
def summary(self, fullpath=False):
"""Return a dict summarizing the coverage data.