diff options
author | Marius Gedminas <marius@gedmin.as> | 2013-02-07 23:05:07 +0000 |
---|---|---|
committer | Marius Gedminas <marius@gedmin.as> | 2013-02-07 23:05:07 +0000 |
commit | 7ae7c9f20705d83a168f25a7c66db7078c3da080 (patch) | |
tree | 9759063871820163c6755fd44cd3c1cd74ef2001 | |
parent | 77bd5254d40b67ec6324606de5721cbc9e58d8e8 (diff) | |
download | zope-tal-7ae7c9f20705d83a168f25a7c66db7078c3da080.tar.gz |
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.
-rw-r--r-- | src/zope/tal/tests/test_talinterpreter.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/zope/tal/tests/test_talinterpreter.py b/src/zope/tal/tests/test_talinterpreter.py index 1969998..24c1b3c 100644 --- a/src/zope/tal/tests/test_talinterpreter.py +++ b/src/zope/tal/tests/test_talinterpreter.py @@ -708,16 +708,18 @@ class OutputPresentationTestCase(TestCaseBase): 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): |