[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/ Avoid cross-platform repr problems.

Tres Seaver cvs-admin at zope.org
Wed May 9 05:59:52 UTC 2012


Log message for revision 125762:
  Avoid cross-platform repr problems.

Changed:
  U   zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/config.py
  U   zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py

-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/config.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/config.py	2012-05-09 05:51:30 UTC (rev 125761)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/config.py	2012-05-09 05:59:49 UTC (rev 125762)
@@ -391,7 +391,7 @@
     def __init__(self, etype, evalue, info):
         self.etype, self.evalue, self.info = etype, evalue, info
 
-    def __str__(self):
+    def __str__(self): #pragma NO COVER
         return "%s: %s\n  in:\n  %s" % (self.etype, self.evalue, self.info)
 
 ##############################################################################

Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py	2012-05-09 05:51:30 UTC (rev 125761)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py	2012-05-09 05:59:49 UTC (rev 125762)
@@ -718,8 +718,9 @@
         cm.action(None, _err)
         exc = self.assertRaises(ConfigurationExecutionError,
                                 cm.execute_actions)
-        self.assertEqual(str(exc),
-                         "<type 'exceptions.ValueError'>: XXX\n  in:\n  INFO")
+        self.assertTrue(exc.etype is ValueError)
+        self.assertEqual(str(exc.evalue), "XXX")
+        self.assertEqual(exc.info, "INFO")
 
     def test_keyword_handling(self):
         # This is really an integraiton test.



More information about the checkins mailing list