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 | 67dda6193ac439de034a6c1236800500be8c7193 (patch) | |
| tree | b27835ad36823fbbe22fbcf7bf7f134c68b58100 /tests/farm/html | |
| parent | b45f28a29661a60b0a45efafd6e875ceb34146b7 (diff) | |
| download | python-coveragepy-git-67dda6193ac439de034a6c1236800500be8c7193.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 8b5aa97b..04fdfd4b 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 1d6b8394..205ca453 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 b8feab64..18d7f7d9 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") |
