[Checkins] SVN: zope.publisher/trunk/ Remove use of string exceptions in tests, http://bugs.debian.org/585343

Brian Sutherland jinty at web.de
Thu Jun 10 02:26:48 EDT 2010


Log message for revision 113309:
  Remove use of string exceptions in tests, http://bugs.debian.org/585343

Changed:
  U   zope.publisher/trunk/CHANGES.txt
  U   zope.publisher/trunk/src/zope/publisher/tests/basetestiapplicationrequest.py
  U   zope.publisher/trunk/src/zope/publisher/tests/test_requestdataproperty.py

-=-
Modified: zope.publisher/trunk/CHANGES.txt
===================================================================
--- zope.publisher/trunk/CHANGES.txt	2010-06-10 01:09:36 UTC (rev 113308)
+++ zope.publisher/trunk/CHANGES.txt	2010-06-10 06:26:47 UTC (rev 113309)
@@ -5,6 +5,7 @@
 -------------------
 
 - LP #131460: Make principal logging unicode safe.
+- Remove use of string exceptions in tests, http://bugs.debian.org/585343
 
 3.12.3 (2010-04-30)
 -------------------

Modified: zope.publisher/trunk/src/zope/publisher/tests/basetestiapplicationrequest.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/tests/basetestiapplicationrequest.py	2010-06-10 01:09:36 UTC (rev 113308)
+++ zope.publisher/trunk/src/zope/publisher/tests/basetestiapplicationrequest.py	2010-06-10 06:26:47 UTC (rev 113309)
@@ -37,7 +37,7 @@
         except AttributeError:
             pass
         else:
-            raise "Shouldn't be able to set environment"
+            raise AssertionError("Shouldn't be able to set environment")
 
         environment = request.environment
 

Modified: zope.publisher/trunk/src/zope/publisher/tests/test_requestdataproperty.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/tests/test_requestdataproperty.py	2010-06-10 01:09:36 UTC (rev 113308)
+++ zope.publisher/trunk/src/zope/publisher/tests/test_requestdataproperty.py	2010-06-10 06:26:47 UTC (rev 113309)
@@ -55,13 +55,19 @@
 
     def testNoAssign(self):
         data = Data()
-        try: data.something = {}
-        except AttributeError: pass
-        else: raise """Shouldn't be able to assign"""
-        try: data.somedata = {}
-        except AttributeError: pass
-        else: raise """Shouldn't be able to assign"""
+        try:
+            data.something = {}
+        except AttributeError:
+            pass
+        else:
+            raise AssertionError("Shouldn't be able to assign")
 
+        try:
+            data.somedata = {}
+        except AttributeError:
+            pass
+        else:
+            raise AssertionError("Shouldn't be able to assign")
 
 def test_suite():
     return makeSuite(Test)



More information about the checkins mailing list