CVS: Products/ParsedXML/tests - test_parser.py:1.8
Martijn Faassen <[email protected]> Fri, 20 Dec 2002 10:29:30 -0500
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs-repository/Products/ParsedXML/tests
In directory cvs.zope.org:/tmp/cvs-serv11741/tests
Modified Files:
test_parser.py
Log Message:
Updated CHANGES. Now uses xml.parsers.expat and not xml.parsers.pyexpat
as that's the canonical way to do it.
=== Products/ParsedXML/tests/test_parser.py 1.7 => 1.8 ===
--- Products/ParsedXML/tests/test_parser.py:1.7 Thu May 16 17:02:43 2002
+++ Products/ParsedXML/tests/test_parser.py Fri Dec 20 10:29:29 2002
@@ -394,7 +394,7 @@
# FIXME: if the next line is enabled, the tests will succeed
# with python 2.1. Unfortunately the whole testsuite will
# segfault at about test 23 (it'll vary)
- #outFile = unicode(outFile)
+ # outFile = unicode(outFile)
# Print the DOM, and compare against the expected output.
output = printElement(doc)
@@ -418,11 +418,11 @@
def checkParseException(self):
"assert exception & exception args are correct"
- from xml.parsers import pyexpat
+ from xml.parsers import expat
text = "<doc>\nfoobar<</doc>" # parse error line 2 column 7
try:
ParsedXML.ParsedXML('foo', text)
- except pyexpat.error, e:
+ except expat.error, e:
assert e.lineno == 2, (
"parse exception give wrong line number. Wanted %s got %s"
% (2, e.lineno))
@@ -434,13 +434,13 @@
def checkSubnodeParseException(self):
"assert exception & exception args are correct"
- from xml.parsers import pyexpat
+ from xml.parsers import expat
docText = "<doc><child/></doc>"
subText = "<child>\nfoobar<</child>" # parse error line 2 column 7
doc = ParsedXML.ParsedXML('foo', docText)
try:
doc.documentElement.firstChild.parseXML(StringIO(subText))
- except pyexpat.error, e:
+ except expat.error, e:
assert e.lineno == 2, (
"parse exception gives wrong line number. Wanted %s, got %s"
% (2, e.lineno))