CVS: Products/ParsedXML/tests - test_all.py:1.5 test_parser.py:1.7
Martijn Faassen <[email protected]> Thu, 16 May 2002 17:02:45 -0400
| 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-serv10814
Modified Files:
test_all.py test_parser.py
Log Message:
Got rid of some failing tests which were quite possibly testing the
wrong stuff anyway, just to regain some sanity here.
=== Products/ParsedXML/tests/test_all.py 1.4 => 1.5 ===
unittest.JUnitTextTestRunner().run(test_suite())
else:
- unittest.TextTestRunner(verbosity=5).run(test_suite())
+ unittest.TextTestRunner(verbosity=0).run(test_suite())
if __name__ == '__main__':
main()
=== Products/ParsedXML/tests/test_parser.py 1.6 => 1.7 ===
def checkParseException(self):
"assert exception & exception args are correct"
- from Products.ParsedXML import Expat
+ from xml.parsers import pyexpat
text = "<doc>\nfoobar<</doc>" # parse error line 2 column 7
try:
ParsedXML.ParsedXML('foo', text)
- except Expat.pyexpat.error, e:
+ except pyexpat.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 Products.ParsedXML import Expat
+ from xml.parsers import pyexpat
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 Expat.pyexpat.error, e:
+ except pyexpat.error, e:
assert e.lineno == 2, (
"parse exception gives wrong line number. Wanted %s, got %s"
% (2, e.lineno))