diff options
Diffstat (limited to 'tests/farm/html/run_y_xml_branch.py')
| -rw-r--r-- | tests/farm/html/run_y_xml_branch.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/farm/html/run_y_xml_branch.py b/tests/farm/html/run_y_xml_branch.py new file mode 100644 index 0000000..88a2e44 --- /dev/null +++ b/tests/farm/html/run_y_xml_branch.py @@ -0,0 +1,21 @@ +def xml_it(): + """Run coverage and make an XML report for y.""" + import coverage + cov = coverage.coverage(branch=True) + cov.start() + import y # pragma: nested + cov.stop() # pragma: nested + cov.xml_report(y, outfile="../xml_branch/coverage.xml") + +import os +if not os.path.exists("xml_branch"): + os.makedirs("xml_branch") + +runfunc(xml_it, rundir="src") + +compare("gold_y_xml_branch", "xml_branch", scrubs=[ + (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), + (r' version="[-.\w]+"', ' version="VERSION"'), + (r'/code/coverage/?[-.\w]*', '/code/coverage/VER'), + ]) +clean("xml_branch") |
