~ztk-steering-group/zope.pagetemplate/trunk

« back to all changes in this revision

Viewing changes to src/zope/pagetemplate/tests/test_htmltests.py

  • Committer: mauritsvanrees
  • Date: 2013-01-18 22:03:20 UTC
  • Revision ID: svn-v4:62d5b8a3-27da-0310-9561-8e5933582275:zope.pagetemplate/trunk:129051
Added crude way of normalizing whitespace in an html test.

When using Chameleon/z3c.ptcompat there are minor differences that are irrelevant.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        namespace = dict(template=t, options={}, args=(),
144
144
                         nothing=None, context=context)
145
145
        out = t.pt_render(namespace)
 
146
        # crude way of normalizing whitespace
 
147
        expect = expect.replace(' ', '').replace('\n\n', '\n')
 
148
        out = out.replace(' ', '').replace('\n\n', '\n')
146
149
        util.check_html(expect, out)
147
150
        # https://bugs.launchpad.net/zope.pagetemplate/+bug/732972
148
151
        errors = t.pt_errors(namespace, check_macro_expansion=False)