[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_xmlconfig.py Full coverage for z.c.xmlconfig.ZopeSAXParseException.
Tres Seaver
cvs-admin at zope.org
Wed May 9 23:47:11 UTC 2012
Log message for revision 125804:
Full coverage for z.c.xmlconfig.ZopeSAXParseException.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_xmlconfig.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_xmlconfig.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_xmlconfig.py 2012-05-09 23:47:03 UTC (rev 125803)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_xmlconfig.py 2012-05-09 23:47:08 UTC (rev 125804)
@@ -51,7 +51,15 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
+ def test___str___not_a_sax_error(self):
+ zxce = self._makeOne(Exception('Not a SAX error'))
+ self.assertEqual(str(zxce), "Not a SAX error")
+ def test___str___w_a_sax_error(self):
+ zxce = self._makeOne(Exception('filename.xml:24:32:WAAA'))
+ self.assertEqual(str(zxce), 'File "filename.xml", line 24.32, WAAA')
+
+
class ParserInfoTests(unittest.TestCase):
def _getTargetClass(self):
More information about the checkins
mailing list