[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - Synchronization.py:1.5

Guido van Rossum guido@python.org
Sat, 26 Jan 2002 15:28:46 -0500


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

Modified Files:
	Synchronization.py 
Log Message:
Make sure that a transaction that is successfully begun is always
aborted.


=== StandaloneZODB/ZODB/tests/Synchronization.py 1.4 => 1.5 ===
 
     def checkAbortWrongTrans(self):
-        self._storage.tpc_begin(Transaction())
+        t = Transaction()
+        self._storage.tpc_begin(t)
         self._storage.tpc_abort(Transaction())
+        self._storage.tpc_abort(t)
 
     def checkFinishNotCommitting(self):
-        self._storage.tpc_finish(Transaction())
+        t = Transaction()
+        self._storage.tpc_finish(t)
+        self._storage.tpc_abort(t)
 
     def checkFinishWrongTrans(self):
-        self._storage.tpc_begin(Transaction())
+        t = Transaction()
+        self._storage.tpc_begin(t)
         self._storage.tpc_finish(Transaction())
+        self._storage.tpc_abort(t)
     
     def checkBeginCommitting(self):
         t = Transaction()
         self._storage.tpc_begin(t)
         self._storage.tpc_begin(t)
+        self._storage.tpc_abort(t)
 
     # XXX how to check undo?