[Zope-Checkins] CVS: ZODB/src/ZODB/tests - testDemoStorage.py:1.10 TransactionalUndoVersionStorage.py:1.16 TransactionalUndoStorage.py:1.38 Synchronization.py:1.10 StorageTestBase.py:1.32 ReadOnlyStorage.py:1.10 IteratorStorage.py:1.19 ConflictResolution.py:1.13

Jeremy Hylton jeremy at zope.com
Tue Feb 17 20:13:30 EST 2004


Update of /cvs-repository/ZODB/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv25077/src/ZODB/tests

Modified Files:
	testDemoStorage.py TransactionalUndoVersionStorage.py 
	TransactionalUndoStorage.py Synchronization.py 
	StorageTestBase.py ReadOnlyStorage.py IteratorStorage.py 
	ConflictResolution.py 
Log Message:
Rename transactionalUndo() to undo().

The old undo was not used by Zope and shouldn't have been used by any
other client.  The newly named undo() is the preferred version of
undo.

XXX DemoStorage didn't implement transactionalUndo, so now it doesn't
implementation undo() at all.  We need to replace it with the demo
storage from ZODB4.

There are a few changes related to ZODB4 removal in this checkin.


=== ZODB/src/ZODB/tests/testDemoStorage.py 1.9 => 1.10 ===
--- ZODB/src/ZODB/tests/testDemoStorage.py:1.9	Mon Dec 29 18:37:34 2003
+++ ZODB/src/ZODB/tests/testDemoStorage.py	Tue Feb 17 20:12:59 2004
@@ -43,6 +43,17 @@
         # XXX Need to implement a real loadBefore for DemoStorage?
         pass
 
+    # the next three pack tests depend on undo
+
+    def checkPackVersionReachable(self):
+        pass
+
+    def checkPackVersions(self):
+        pass
+
+    def checkPackVersionsInPast(self):
+        pass
+
 
 def test_suite():
     suite = unittest.makeSuite(DemoStorageTests, 'check')


=== ZODB/src/ZODB/tests/TransactionalUndoVersionStorage.py 1.15 => 1.16 ===
--- ZODB/src/ZODB/tests/TransactionalUndoVersionStorage.py:1.15	Wed Dec 24 11:01:58 2003
+++ ZODB/src/ZODB/tests/TransactionalUndoVersionStorage.py	Tue Feb 17 20:12:59 2004
@@ -11,8 +11,8 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-# Check interactions between transactionalUndo() and versions.  Any storage
-# that supports both transactionalUndo() and versions must pass these tests.
+# Check interactions between undo() and versions.  Any storage that
+# supports both undo() and versions must pass these tests.
 
 import time
 


=== ZODB/src/ZODB/tests/TransactionalUndoStorage.py 1.37 => 1.38 ===
--- ZODB/src/ZODB/tests/TransactionalUndoStorage.py:1.37	Fri Jan 16 14:26:08 2004
+++ ZODB/src/ZODB/tests/TransactionalUndoStorage.py	Tue Feb 17 20:12:59 2004
@@ -11,9 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Check transactionalUndo().
+"""Check undo().
 
-Any storage that supports transactionalUndo() must pass these tests.
+Any storage that supports undo() must pass these tests.
 """
 
 import time
@@ -102,7 +102,7 @@
         t = Transaction()
         t.note(note)
         self._storage.tpc_begin(t)
-        oids = self._storage.transactionalUndo(tid, t)
+        oids = self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         return oids
@@ -150,7 +150,7 @@
         t = Transaction()
         t.note('undo1')
         self._storage.tpc_begin(t)
-        self._storage.transactionalUndo(tid, t)
+        self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         # Check that calling getSerial on an uncreated object raises a KeyError
@@ -279,8 +279,8 @@
         tid1 = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        tid, oids = self._storage.transactionalUndo(tid, t)
-        tid, oids1 = self._storage.transactionalUndo(tid1, t)
+        tid, oids = self._storage.undo(tid, t)
+        tid, oids1 = self._storage.undo(tid1, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         # We get the finalization stuff called an extra time:
@@ -353,7 +353,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        tid, oids = self._storage.transactionalUndo(tid, t)
+        tid, oids = self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         eq(len(oids), 1)
@@ -379,7 +379,7 @@
         t = Transaction()
         self._storage.tpc_begin(t)
         self.assertRaises(POSException.UndoError,
-                          self._storage.transactionalUndo,
+                          self._storage.undo,
                           tid, t)
         self._storage.tpc_abort(t)
         # Now have more fun: object1 and object2 are in the same transaction,
@@ -418,7 +418,7 @@
         t = Transaction()
         self._storage.tpc_begin(t)
         self.assertRaises(POSException.UndoError,
-                          self._storage.transactionalUndo,
+                          self._storage.undo,
                           tid, t)
         self._storage.tpc_abort(t)
         self._iterate()
@@ -446,7 +446,7 @@
         # And now attempt to undo the last transaction
         t = Transaction()
         self._storage.tpc_begin(t)
-        tid, oids = self._storage.transactionalUndo(tid, t)
+        tid, oids = self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         eq(len(oids), 1)
@@ -652,7 +652,7 @@
             base = i * OBJECTS + i
             for j in range(OBJECTS):
                 tid = info[base + j]['id']
-                s.transactionalUndo(tid, t)
+                s.undo(tid, t)
             s.tpc_vote(t)
             s.tpc_finish(t)
 


=== ZODB/src/ZODB/tests/Synchronization.py 1.9 => 1.10 ===
--- ZODB/src/ZODB/tests/Synchronization.py:1.9	Thu Oct  2 14:17:17 2003
+++ ZODB/src/ZODB/tests/Synchronization.py	Tue Feb 17 20:12:59 2004
@@ -41,7 +41,7 @@
 New and/or unspecified methods:
 
 tpc_vote(): handled like tpc_abort
-transactionalUndo(): handled like undo()  (which is how?)
+undo(): how's that handled?
 
 Methods that have nothing to do with committing/non-committing:
 load(), loadSerial(), getName(), getSize(), __len__(), history(),


=== ZODB/src/ZODB/tests/StorageTestBase.py 1.31 => 1.32 ===
--- ZODB/src/ZODB/tests/StorageTestBase.py:1.31	Wed Dec 24 11:01:58 2003
+++ ZODB/src/ZODB/tests/StorageTestBase.py	Tue Feb 17 20:12:59 2004
@@ -209,7 +209,7 @@
         t = Transaction()
         t.note(note or "undo")
         self._storage.tpc_begin(t)
-        tid, oids = self._storage.transactionalUndo(tid, t)
+        tid, oids = self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         if expected_oids is not None:


=== ZODB/src/ZODB/tests/ReadOnlyStorage.py 1.9 => 1.10 ===
--- ZODB/src/ZODB/tests/ReadOnlyStorage.py:1.9	Wed Dec 24 11:01:58 2003
+++ ZODB/src/ZODB/tests/ReadOnlyStorage.py	Tue Feb 17 20:12:59 2004
@@ -60,5 +60,5 @@
                           '\000' * 8, None, '', '', t)
 
         if self._storage.supportsTransactionalUndo():
-            self.assertRaises(ReadOnlyError, self._storage.transactionalUndo,
+            self.assertRaises(ReadOnlyError, self._storage.undo,
                               '\000' * 8, t)


=== ZODB/src/ZODB/tests/IteratorStorage.py 1.18 => 1.19 ===
--- ZODB/src/ZODB/tests/IteratorStorage.py:1.18	Wed Dec 24 11:01:58 2003
+++ ZODB/src/ZODB/tests/IteratorStorage.py	Tue Feb 17 20:12:59 2004
@@ -100,7 +100,7 @@
         # Undo the creation of the object, rendering it a zombie
         t = Transaction()
         self._storage.tpc_begin(t)
-        oids = self._storage.transactionalUndo(tid, t)
+        oids = self._storage.undo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
         # Now attempt to iterator over the storage


=== ZODB/src/ZODB/tests/ConflictResolution.py 1.12 => 1.13 ===
--- ZODB/src/ZODB/tests/ConflictResolution.py:1.12	Fri Nov 28 11:44:54 2003
+++ ZODB/src/ZODB/tests/ConflictResolution.py	Tue Feb 17 20:12:59 2004
@@ -162,7 +162,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self._storage.transactionalUndo(tid, t)
+        self._storage.undo(tid, t)
         self._storage.tpc_finish(t)
 
     def checkUndoUnresolvable(self):
@@ -183,6 +183,6 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self.assertRaises(UndoError, self._storage.transactionalUndo,
+        self.assertRaises(UndoError, self._storage.undo,
                           tid, t)
         self._storage.tpc_abort(t)




More information about the Zope-Checkins mailing list