[Checkins] SVN: zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py Explain the &#45 parsing difference (it's the stdlib)

Marius Gedminas cvs-admin at zope.org
Thu Feb 7 23:18:38 UTC 2013


Log message for revision 129201:
  Explain the &#45 parsing difference (it's the stdlib)

Changed:
  U   zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py

-=-
Modified: zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py
===================================================================
--- zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py	2013-02-07 23:05:12 UTC (rev 129200)
+++ zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py	2013-02-07 23:18:38 UTC (rev 129201)
@@ -709,13 +709,13 @@
 
     def test_entities(self):
         if sys.version_info < (3, 0):
+            # HTMLParser.HTMLParser in Python 2.x parses "&#45" as "&#45"
             INPUT = ('<img tal:define="foo nothing" '
                     'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
             EXPECTED = ('<img alt="&a; \x01 \n '
                         '&amp;a &amp;#45 &amp;; &lt;&gt;" />')
         else:
-            # XXX: why does &#45 with no terminating ; become a - on
-            # Python 3.3 and is that acceptable or a regression?
+            # html.parser.HTMLParser in Python 3.3 parses "&#45" as "-"
             INPUT = ('<img tal:define="foo nothing" '
                     'alt="&a; &#1; &#x0a; &a &#45 &; <>" />')
             EXPECTED = ('<img alt="&a; \x01 \n '



More information about the checkins mailing list