summaryrefslogtreecommitdiff
path: root/test/farm/html/run_y_xml_branch.py
blob: 46f426d37040db82d4a868fd3ef1a52525836f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def xml_it():
    """Run coverage and make an XML report for y."""
    import coverage
    cov = coverage.coverage(branch=True)
    cov.start()
    import y
    cov.stop()
    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"'),
    ])
clean("xml_branch")