summaryrefslogtreecommitdiff
path: root/test/farm/html/run_a_xml_1.py
blob: 7f4805ef2d390a27c0fdf1c167bfcbc35c37928f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def html_it():
    """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_1/coverage.xml")

import os
if not os.path.exists("xml_1"):
    os.makedirs("xml_1")

runfunc(html_it, rundir="src")

compare("gold_x_xml", "xml_1", scrubs=[
    (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'),
    (r' version="[-.\w]+"', ' version="VERSION"'),
    ])
clean("xml_1")