[Checkins] SVN: Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py Wiggy this test doesnt actually fail.
Chris McDonough
chrism at plope.com
Mon Sep 29 21:03:16 EDT 2008
Log message for revision 91636:
Wiggy this test doesnt actually fail.
Changed:
U Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py
-=-
Modified: Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py
===================================================================
--- Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py 2008-09-29 22:27:43 UTC (rev 91635)
+++ Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py 2008-09-30 01:03:14 UTC (rev 91636)
@@ -14,17 +14,22 @@
<div id="${foo}" py:attrs="dict(label=foo)"/>
</html>
"""
- expected = """\
+ expected = """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html>
+ <html xmlns="http://www.w3.org/1999/xhtml">
<title>\xc2\xa9</title>
<div label="\xc2\xa9" id="\xc2\xa9"/>
</html>"""
-
c = unicode('\xc2\xa9', 'utf-8')
- self.assertEqual(render_template(body, foo=c), expected)
+ result = render_template(body, foo=c).encode('utf-8')
+ self.assertEqual(norm(result), norm(expected))
+def norm(s):
+ s = s.replace(' ', '')
+ s = s.replace('\n', '')
+ return s
+
def test_suite():
return unittest.findTestCases(sys.modules[__name__])
More information about the Checkins
mailing list