diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-07-22 09:12:21 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-07-22 09:12:21 -0400 |
commit | 852c6a7398fb5934b22dbe078f7cb2914bc4e0cd (patch) | |
tree | d51ad034da235736eabbd141fdf25c103f419270 | |
parent | 9266eebcd681ec38f118fe018a154acb5f1c67ae (diff) | |
download | python-coveragepy-git-852c6a7398fb5934b22dbe078f7cb2914bc4e0cd.tar.gz |
The DTD is no longer valid. Don't reference it.
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | coverage/xmlreport.py | 4 | ||||
-rw-r--r-- | tests/farm/html/gold_x_xml/coverage.xml | 3 | ||||
-rw-r--r-- | tests/farm/html/gold_y_xml_branch/coverage.xml | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 3b9b9d26..6da614f0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,10 @@ Latest instead of a pickle, closing `issue 236`_. The `CoverageData` class is now a public supported API to the data file. +- The XML report now includes a ``missing-branches`` attribute. Thanks, Steve + Peak. This is not a part of the Cobertura DTD, so the XML report no longer + references the DTD. + - All the reporting functions now behave the same if no data had been collected, exiting with a status code of 1. Fixed ``fail_under`` to be applied even when the report is empty. Thanks, Ionel Cristian Mărieș. diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index 0df449f3..aa12ab2d 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -47,8 +47,7 @@ class XmlReporter(Reporter): # Create the DOM that will store the data. impl = xml.dom.minidom.getDOMImplementation() - docType = impl.createDocumentType("coverage", None, DTD_URL) - self.xml_out = impl.createDocument(None, "coverage", docType) + self.xml_out = impl.createDocument(None, "coverage", None) # Write header stuff. xcoverage = self.xml_out.documentElement @@ -57,6 +56,7 @@ class XmlReporter(Reporter): xcoverage.appendChild(self.xml_out.createComment( " Generated by coverage.py: %s " % __url__ )) + xcoverage.appendChild(self.xml_out.createComment(" Based on %s " % DTD_URL)) # Call xml_file for each file in the data. self.report_files(self.xml_file, morfs) diff --git a/tests/farm/html/gold_x_xml/coverage.xml b/tests/farm/html/gold_x_xml/coverage.xml index 9a8fb154..075655dd 100644 --- a/tests/farm/html/gold_x_xml/coverage.xml +++ b/tests/farm/html/gold_x_xml/coverage.xml @@ -1,8 +1,7 @@ <?xml version="1.0" ?>
-<!DOCTYPE coverage
- SYSTEM 'https://raw.githubusercontent.com/cobertura/web/f0366e5e2cf18f111cbd61fc34ef720a6584ba02/htdocs/xml/coverage-03.dtd'>
<coverage branch-rate="0" line-rate="0.6667" timestamp="1253972570431" version="3.1b1">
<!-- Generated by coverage.py: https://coverage.readthedocs.org/VER -->
+ <!-- Based on https://raw.githubusercontent.com/cobertura/web/f0366e5e2cf18f111cbd61fc34ef720a6584ba02/htdocs/xml/coverage-03.dtd -->
<sources>
<source></source>
</sources>
diff --git a/tests/farm/html/gold_y_xml_branch/coverage.xml b/tests/farm/html/gold_y_xml_branch/coverage.xml index 63625b28..9434ac79 100644 --- a/tests/farm/html/gold_y_xml_branch/coverage.xml +++ b/tests/farm/html/gold_y_xml_branch/coverage.xml @@ -1,8 +1,7 @@ <?xml version="1.0" ?>
-<!DOCTYPE coverage
- SYSTEM 'https://raw.githubusercontent.com/cobertura/web/f0366e5e2cf18f111cbd61fc34ef720a6584ba02/htdocs/xml/coverage-03.dtd'>
<coverage branch-rate="0.5" line-rate="0.8" timestamp="1259288252325" version="3.2b4">
<!-- Generated by coverage.py: https://coverage.readthedocs.org/VER -->
+ <!-- Based on https://raw.githubusercontent.com/cobertura/web/f0366e5e2cf18f111cbd61fc34ef720a6584ba02/htdocs/xml/coverage-03.dtd -->
<sources>
<source></source>
</sources>
|