diff options
Diffstat (limited to 'test/farm/html')
-rw-r--r-- | test/farm/html/run_a_xml_1.py (renamed from test/farm/html/run_a_xml.py) | 12 | ||||
-rw-r--r-- | test/farm/html/run_a_xml_2.py | 20 | ||||
-rw-r--r-- | test/farm/html/src/coverage.xml | 20 | ||||
-rw-r--r-- | test/farm/html/src/run_a_xml_2.ini | 3 |
4 files changed, 49 insertions, 6 deletions
diff --git a/test/farm/html/run_a_xml.py b/test/farm/html/run_a_xml_1.py index dabfa61f..7f4805ef 100644 --- a/test/farm/html/run_a_xml.py +++ b/test/farm/html/run_a_xml_1.py @@ -1,20 +1,20 @@ def html_it(): - """Run coverage and make an XML report for x.""" + """Run coverage and make an XML report for a.""" import coverage cov = coverage.coverage() cov.start() import a cov.stop() - cov.xml_report(a, outfile="../xml/coverage.xml") + cov.xml_report(a, outfile="../xml_1/coverage.xml") import os -if not os.path.exists("xml"): - os.makedirs("xml") +if not os.path.exists("xml_1"): + os.makedirs("xml_1") runfunc(html_it, rundir="src") -compare("gold_x_xml", "xml", scrubs=[ +compare("gold_x_xml", "xml_1", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), ]) -clean("xml") +clean("xml_1") diff --git a/test/farm/html/run_a_xml_2.py b/test/farm/html/run_a_xml_2.py new file mode 100644 index 00000000..b08d7960 --- /dev/null +++ b/test/farm/html/run_a_xml_2.py @@ -0,0 +1,20 @@ +def html_it(): + """Run coverage and make an XML report for a.""" + import coverage + cov = coverage.coverage(config_file="run_a_xml_2.ini") + cov.start() + import a + cov.stop() + cov.xml_report(a) + +import os +if not os.path.exists("xml_2"): + os.makedirs("xml_2") + +runfunc(html_it, rundir="src") + +compare("gold_x_xml", "xml_2", scrubs=[ + (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), + (r' version="[-.\w]+"', ' version="VERSION"'), + ]) +clean("xml_2") diff --git a/test/farm/html/src/coverage.xml b/test/farm/html/src/coverage.xml new file mode 100644 index 00000000..bc517328 --- /dev/null +++ b/test/farm/html/src/coverage.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" ?>
+<!DOCTYPE coverage
+ SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-03.dtd'>
+<coverage branch-rate="0.0" line-rate="0.666666666667" timestamp="1263087779313" version="3.3a1">
+ <!-- Generated by coverage.py: http://nedbatchelder.com/code/coverage -->
+ <packages>
+ <package branch-rate="0.0" complexity="0.0" line-rate="0.666666666667" name=".">
+ <classes>
+ <class branch-rate="0.0" complexity="0.0" filename="a.py" line-rate="0.666666666667" name="a">
+ <methods/>
+ <lines>
+ <line hits="1" number="3"/>
+ <line hits="1" number="5"/>
+ <line hits="0" number="7"/>
+ </lines>
+ </class>
+ </classes>
+ </package>
+ </packages>
+</coverage>
diff --git a/test/farm/html/src/run_a_xml_2.ini b/test/farm/html/src/run_a_xml_2.ini new file mode 100644 index 00000000..8d28f97b --- /dev/null +++ b/test/farm/html/src/run_a_xml_2.ini @@ -0,0 +1,3 @@ +# Put all the XML output in xml_2 +[xml] +output = ../xml_2/coverage.xml |