diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-02 20:43:35 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-02 20:43:35 -0400 |
| commit | 5bdf4f04ef9c422f4e5d021f6843de1db9b82413 (patch) | |
| tree | 3ee521de274f5db371cd053e2891a1af96f7c7ea /tests/farm | |
| parent | 8ae2c4cdedec34c2e1a445e3f21df41e908a4d7f (diff) | |
| download | python-coveragepy-git-5bdf4f04ef9c422f4e5d021f6843de1db9b82413.tar.gz | |
Clean up Stan Hu's pull request, and add him to changes and authors
Diffstat (limited to 'tests/farm')
| -rw-r--r-- | tests/farm/html/run_a_xml_1.py | 9 | ||||
| -rw-r--r-- | tests/farm/html/run_a_xml_2.py | 9 | ||||
| -rw-r--r-- | tests/farm/html/run_y_xml_branch.py | 9 |
3 files changed, 12 insertions, 15 deletions
diff --git a/tests/farm/html/run_a_xml_1.py b/tests/farm/html/run_a_xml_1.py index 04fdfd4b..83f8c86d 100644 --- a/tests/farm/html/run_a_xml_1.py +++ b/tests/farm/html/run_a_xml_1.py @@ -1,4 +1,4 @@ -relative_path = None +source_path = None def html_it(): """Run coverage and make an XML report for a.""" @@ -8,8 +8,8 @@ def html_it(): import a # pragma: nested cov.stop() # pragma: nested cov.xml_report(a, outfile="../xml_1/coverage.xml") - global relative_path - relative_path = cov.file_locator.relative_dir.rstrip('/') + global source_path + source_path = cov.file_locator.relative_dir.rstrip('/') import os if not os.path.exists("xml_1"): @@ -20,8 +20,7 @@ runfunc(html_it, rundir="src") compare("gold_x_xml", "xml_1", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), - (r'<source>(\s)*?(.*)(\s)*?</source>', - '<source>%s</source>' % relative_path), + (r'<source>\s*.*?\s*</source>', '<source>%s</source>' % source_path), (r'/code/coverage/?[-.\w]*', '/code/coverage/VER'), ]) clean("xml_1") diff --git a/tests/farm/html/run_a_xml_2.py b/tests/farm/html/run_a_xml_2.py index 205ca453..6dd44225 100644 --- a/tests/farm/html/run_a_xml_2.py +++ b/tests/farm/html/run_a_xml_2.py @@ -1,4 +1,4 @@ -relative_path = None +source_path = None def html_it(): """Run coverage and make an XML report for a.""" @@ -8,8 +8,8 @@ def html_it(): import a # pragma: nested cov.stop() # pragma: nested cov.xml_report(a) - global relative_path - relative_path = cov.file_locator.relative_dir.rstrip('/') + global source_path + source_path = cov.file_locator.relative_dir.rstrip('/') import os if not os.path.exists("xml_2"): @@ -20,8 +20,7 @@ runfunc(html_it, rundir="src") compare("gold_x_xml", "xml_2", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), - (r'<source>(\s)*?(.*)(\s)*?</source>', - '<source>%s</source>' % relative_path), + (r'<source>\s*.*?\s*</source>', '<source>%s</source>' % source_path), (r'/code/coverage/?[-.\w]*', '/code/coverage/VER'), ]) clean("xml_2") diff --git a/tests/farm/html/run_y_xml_branch.py b/tests/farm/html/run_y_xml_branch.py index 18d7f7d9..9ae9a9f0 100644 --- a/tests/farm/html/run_y_xml_branch.py +++ b/tests/farm/html/run_y_xml_branch.py @@ -1,4 +1,4 @@ -relative_path = None +source_path = None def xml_it(): """Run coverage and make an XML report for y.""" @@ -8,8 +8,8 @@ def xml_it(): import y # pragma: nested cov.stop() # pragma: nested cov.xml_report(y, outfile="../xml_branch/coverage.xml") - global relative_path - relative_path = cov.file_locator.relative_dir.rstrip('/') + global source_path + source_path = cov.file_locator.relative_dir.rstrip('/') import os if not os.path.exists("xml_branch"): @@ -20,8 +20,7 @@ runfunc(xml_it, rundir="src") compare("gold_y_xml_branch", "xml_branch", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), - (r'<source>(\s)*?(.*)(\s)*?</source>', - '<source>%s</source>' % relative_path), + (r'<source>\s*.*?\s*</source>', '<source>%s</source>' % source_path), (r'/code/coverage/?[-.\w]*', '/code/coverage/VER'), ]) clean("xml_branch") |
