summaryrefslogtreecommitdiff
path: root/coverage/results.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-10-27 20:54:52 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-10-27 20:54:52 -0400
commitf357d92aa61437d10dee830a97cfb9932da3db09 (patch)
tree55266e11e6bf007e24ba0f4a65c71987dcd7881d /coverage/results.py
parent2e4e7b649d9c944eb40c5f66e3ad92ddd99798b2 (diff)
downloadpython-coveragepy-f357d92aa61437d10dee830a97cfb9932da3db09.tar.gz
Use json for html status file instead of pickle.
Diffstat (limited to 'coverage/results.py')
-rw-r--r--coverage/results.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/coverage/results.py b/coverage/results.py
index 5eff0f3..f1c63bb 100644
--- a/coverage/results.py
+++ b/coverage/results.py
@@ -182,6 +182,13 @@ class Numbers(object):
self.n_partial_branches = n_partial_branches
self.n_missing_branches = n_missing_branches
+ def init_args(self):
+ """Return a list for __init__(*args) to recreate this object."""
+ return [
+ self.n_files, self.n_statements, self.n_excluded, self.n_missing,
+ self.n_branches, self.n_partial_branches, self.n_missing_branches,
+ ]
+
@classmethod
def set_precision(cls, precision):
"""Set the number of decimal places used to report percentages."""