[Checkins] SVN: zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py Towards Py3K: - inside attribute values
Marius Gedminas
cvs-admin at zope.org
Thu Feb 7 23:05:08 UTC 2013
Log message for revision 129198:
Towards Py3K: - inside attribute values
I've no idea why this case is handled differently on Python 2 and Python 3.
There's precedent for different escaping on different Python versions:
before 2.6 and since 2.6. Speaking of which, let's drop the "before
2.6" case.
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:05 UTC (rev 129197)
+++ zope.tal/trunk/src/zope/tal/tests/test_talinterpreter.py 2013-02-07 23:05:07 UTC (rev 129198)
@@ -708,16 +708,18 @@
self.compare(INPUT, EXPECTED)
def test_entities(self):
- if sys.version_info < (2, 6):
+ if sys.version_info < (3, 0):
INPUT = ('<img tal:define="foo nothing" '
- 'alt="&a;  
 &a - &; �a; <>" />')
- EXPECTED = ('<img alt="&a;  
 '
- '&a &#45 &; &#0a; <>" />')
+ 'alt="&a;  
 &a - &; <>" />')
+ EXPECTED = ('<img alt="&a; \x01 \n '
+ '&a &#45 &; <>" />')
else:
+ # XXX: why does - with no terminating ; become a - on
+ # Python 3.3 and is that acceptable or a regression?
INPUT = ('<img tal:define="foo nothing" '
'alt="&a;  
 &a - &; <>" />')
EXPECTED = ('<img alt="&a; \x01 \n '
- '&a &#45 &; <>" />')
+ '&a - &; <>" />')
self.compare(INPUT, EXPECTED)
def compare(self, INPUT, EXPECTED):
More information about the checkins
mailing list