diff options
| author | Stan Hu <stan.hu@aclimalabs.com> | 2014-04-25 06:56:45 -0700 |
|---|---|---|
| committer | Stan Hu <stan.hu@aclimalabs.com> | 2014-04-25 06:56:45 -0700 |
| commit | 7e29b42cc52b30777fac9157387ce23b52909887 (patch) | |
| tree | 52737f077b327721e754e1af978a19a76ac3b077 /tests/farm/html | |
| parent | 78963a9a59c822da64c5643bf6af7d801b89e460 (diff) | |
| download | python-coveragepy-7e29b42cc52b30777fac9157387ce23b52909887.tar.gz | |
Update tests to handle XML whitespaces differences in Python 2.6. Apply the regexp scrubs to the entire file
instead of individual lines for this to work.
Diffstat (limited to 'tests/farm/html')
| -rw-r--r-- | tests/farm/html/run_a_xml_1.py | 3 | ||||
| -rw-r--r-- | tests/farm/html/run_a_xml_2.py | 3 | ||||
| -rw-r--r-- | tests/farm/html/run_y_xml_branch.py | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/farm/html/run_a_xml_1.py b/tests/farm/html/run_a_xml_1.py index 8b5aa97..04fdfd4 100644 --- a/tests/farm/html/run_a_xml_1.py +++ b/tests/farm/html/run_a_xml_1.py @@ -20,7 +20,8 @@ runfunc(html_it, rundir="src") compare("gold_x_xml", "xml_1", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), - (r'<source></source>', '<source>%s</source>' % relative_path), + (r'<source>(\s)*?(.*)(\s)*?</source>', + '<source>%s</source>' % relative_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 1d6b839..205ca45 100644 --- a/tests/farm/html/run_a_xml_2.py +++ b/tests/farm/html/run_a_xml_2.py @@ -20,7 +20,8 @@ runfunc(html_it, rundir="src") compare("gold_x_xml", "xml_2", scrubs=[ (r' timestamp="\d+"', ' timestamp="TIMESTAMP"'), (r' version="[-.\w]+"', ' version="VERSION"'), - (r'<source></source>', '<source>%s</source>' % relative_path), + (r'<source>(\s)*?(.*)(\s)*?</source>', + '<source>%s</source>' % relative_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 b8feab6..18d7f7d 100644 --- a/tests/farm/html/run_y_xml_branch.py +++ b/tests/farm/html/run_y_xml_branch.py @@ -20,7 +20,8 @@ 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></source>', '<source>%s</source>' % relative_path), + (r'<source>(\s)*?(.*)(\s)*?</source>', + '<source>%s</source>' % relative_path), (r'/code/coverage/?[-.\w]*', '/code/coverage/VER'), ]) clean("xml_branch") |
