[Checkins] SVN: zope.tal/trunk/src/zope/tal/tests/test_xmlparser.py Towards Py3K: xml.parsers.expat wants byte strings
Marius Gedminas
cvs-admin at zope.org
Thu Feb 7 23:04:35 UTC 2013
Log message for revision 129187:
Towards Py3K: xml.parsers.expat wants byte strings
Changed:
U zope.tal/trunk/src/zope/tal/tests/test_xmlparser.py
-=-
Modified: zope.tal/trunk/src/zope/tal/tests/test_xmlparser.py
===================================================================
--- zope.tal/trunk/src/zope/tal/tests/test_xmlparser.py 2013-02-07 21:03:14 UTC (rev 129186)
+++ zope.tal/trunk/src/zope/tal/tests/test_xmlparser.py 2013-02-07 23:04:33 UTC (rev 129187)
@@ -90,7 +90,7 @@
if self.parts:
s = self.parts.pop(0)
else:
- s = ''
+ s = b''
return s
@@ -209,20 +209,20 @@
def test_buffer_artefacts(self):
output = [("starttag", "a", ["b", "<"]), ("endtag", "a")]
- self._run_check(["<a b='<'/>"], output)
- self._run_check(["<a ", "b='<'/>"], output)
- self._run_check(["<a b", "='<'/>"], output)
- self._run_check(["<a b=", "'<'/>"], output)
- self._run_check(["<a b='<", "'/>"], output)
- self._run_check(["<a b='<'", "/>"], output)
+ self._run_check([b"<a b='<'/>"], output)
+ self._run_check([b"<a ", b"b='<'/>"], output)
+ self._run_check([b"<a b", b"='<'/>"], output)
+ self._run_check([b"<a b=", b"'<'/>"], output)
+ self._run_check([b"<a b='<", b"'/>"], output)
+ self._run_check([b"<a b='<'", b"/>"], output)
output = [("starttag", "a", ["b", ">"]), ("endtag", "a")]
- self._run_check(["<a b='>'/>"], output)
- self._run_check(["<a ", "b='>'/>"], output)
- self._run_check(["<a b", "='>'/>"], output)
- self._run_check(["<a b=", "'>'/>"], output)
- self._run_check(["<a b='>", "'/>"], output)
- self._run_check(["<a b='>'", "/>"], output)
+ self._run_check([b"<a b='>'/>"], output)
+ self._run_check([b"<a ", b"b='>'/>"], output)
+ self._run_check([b"<a b", b"='>'/>"], output)
+ self._run_check([b"<a b=", b"'>'/>"], output)
+ self._run_check([b"<a b='>", b"'/>"], output)
+ self._run_check([b"<a b='>'", b"/>"], output)
def test_starttag_junk_chars(self):
self._parse_error("<")
More information about the checkins
mailing list