diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-03 17:38:03 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-03 17:38:03 -0400 |
commit | 69e0a37098edba20e24fe8fa80e6960c53e2c3c7 (patch) | |
tree | a4930e93c377e3b4641c61619fdd8f71a1b125a1 /coverage/xmlreport.py | |
parent | 3f9716518f854fc9396f815b1c3a8feb7c7397d4 (diff) | |
download | python-coveragepy-git-69e0a37098edba20e24fe8fa80e6960c53e2c3c7.tar.gz |
The reporting functions now return a float, the total percentage covered.
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r-- | coverage/xmlreport.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index 03f910c8..e062ceee 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -84,6 +84,9 @@ class XmlReporter(Reporter): # Use the DOM to write the output file. outfile.write(self.xml_out.toprettyxml()) + # Return the total percentage. + return 100.0 * (lhits_tot + bhits_tot) / (lnum_tot + bnum_tot) + def xml_file(self, cu, analysis): """Add to the XML report for a single file.""" |