[Zope-Checkins] CVS: StandaloneZODB/ZODB/tests - IteratorStorage.py:1.2 StorageTestBase.py:1.5 Synchronization.py:1.2

Jeremy Hylton jeremy@zope.com
Thu, 23 Aug 2001 15:31:03 -0400


Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv11156

Modified Files:
	IteratorStorage.py StorageTestBase.py Synchronization.py 
Log Message:
Remove Python 2.x-isms so that tests run under Python 1.5.2


=== StandaloneZODB/ZODB/tests/IteratorStorage.py 1.1 => 1.2 ===
                 assert rec.version == ''
                 assert zodb_unpickle(rec.data) == MinPO(val)
-                val += 1
+                val = val + 1


=== StandaloneZODB/ZODB/tests/StorageTestBase.py 1.4 => 1.5 ===
             klass = ns[klassname]
         except KeyError:
-            print >> sys.stderr, "can't find %s in %s" % (klassname,
-                                                          repr(ns))
+            sys.stderr.write("can't find %s in %s" % (klassname,
+                                                      repr(ns)))
         inst = klass()
     else:
         raise ValueError, "expected class info: %s" % repr(klass_info)


=== StandaloneZODB/ZODB/tests/Synchronization.py 1.1 => 1.2 ===
 class SynchronizedStorage:
 
-    def verifyCommitting(self, callable, *args):
-        self.assertRaises(StorageTransactionError, callable *args)
+##    def verifyCommitting(self, callable, *args):
+##        self.assertRaises(StorageTransactionError, callable *args)
     
     def verifyNotCommitting(self, callable, *args):
-        self.assertRaises(StorageTransactionError, callable, *args)
+        args = (StorageTransactionError, callable) + args
+        apply(self.assertRaises, args)
 
     def verifyWrongTrans(self, callable, *args):
         self._storage.tpc_begin(self._transaction)
-        self.assertRaises(StorageTransactionError, callable, *args)
+        args = (StorageTransactionError, callable) + args
+        apply(self.assertRaises, args)
 
     def checkAbortVersionNotCommitting(self):
         self.verifyNotCommitting(self._storage.abortVersion,