summaryrefslogtreecommitdiff
path: root/coverage/data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-03-24 22:49:37 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-03-24 22:49:37 -0400
commit6df11611c656dc15fa47e3044987a87cc32c43aa (patch)
tree60f55c0a2891010d950ed1ff3658df02cad252b8 /coverage/data.py
parent67a56e01aab739c49db65318a271c4c91f8db294 (diff)
downloadpython-coveragepy-6df11611c656dc15fa47e3044987a87cc32c43aa.tar.gz
Incremental HTML generation. Some cleanup would be good.
Diffstat (limited to 'coverage/data.py')
-rw-r--r--coverage/data.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/coverage/data.py b/coverage/data.py
index 5d482ea..3263cb3 100644
--- a/coverage/data.py
+++ b/coverage/data.py
@@ -228,6 +228,11 @@ class CoverageData(object):
"""A map containing all the arcs executed in `filename`."""
return self.arcs.get(filename) or {}
+ def add_to_hash(self, filename, hasher):
+ """Contribute `filename`'s data to the Md5Hash `hasher`."""
+ hasher.update(self.executed_lines(filename))
+ hasher.update(self.executed_arcs(filename))
+
def summary(self, fullpath=False):
"""Return a dict summarizing the coverage data.