diff options
author | Maurits van Rees <maurits@vanrees.org> | 2013-01-18 22:03:20 +0000 |
---|---|---|
committer | Maurits van Rees <maurits@vanrees.org> | 2013-01-18 22:03:20 +0000 |
commit | 9acc85d34313b8a9eef5c72a21afe3fa29af6779 (patch) | |
tree | ea494b702674580f63e083c57a6039be19a5d462 /src/zope/pagetemplate/tests | |
parent | 608c84cb2de8108de8540dad568f50613ff7b7e5 (diff) | |
download | zope-pagetemplate-9acc85d34313b8a9eef5c72a21afe3fa29af6779.tar.gz |
Added crude way of normalizing whitespace in an html test.
When using Chameleon/z3c.ptcompat there are minor differences that are irrelevant.
Diffstat (limited to 'src/zope/pagetemplate/tests')
-rw-r--r-- | src/zope/pagetemplate/tests/test_htmltests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zope/pagetemplate/tests/test_htmltests.py b/src/zope/pagetemplate/tests/test_htmltests.py index e0dc5ae..c6abd81 100644 --- a/src/zope/pagetemplate/tests/test_htmltests.py +++ b/src/zope/pagetemplate/tests/test_htmltests.py @@ -143,6 +143,9 @@ class HTMLTests(unittest.TestCase): namespace = dict(template=t, options={}, args=(), nothing=None, context=context) out = t.pt_render(namespace) + # crude way of normalizing whitespace + expect = expect.replace(' ', '').replace('\n\n', '\n') + out = out.replace(' ', '').replace('\n\n', '\n') util.check_html(expect, out) # https://bugs.launchpad.net/zope.pagetemplate/+bug/732972 errors = t.pt_errors(namespace, check_macro_expansion=False) |