[Zope-Checkins] CVS: ZODB3/ZODB/tests - TransactionalUndoStorage.py:1.33.2.2 testRecover.py:1.4.2.1

Jeremy Hylton jeremy at zope.com
Thu Oct 9 16:26:25 EDT 2003


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv28627/ZODB/tests

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	TransactionalUndoStorage.py testRecover.py 
Log Message:
Convert large portion of FileStorage to use the format helper methods.

I see a few storage test failures, but those may be the same ones that
I was seeing because of problems in the MVCC implementation.


=== ZODB3/ZODB/tests/TransactionalUndoStorage.py 1.33.2.1 => 1.33.2.2 ===
--- ZODB3/ZODB/tests/TransactionalUndoStorage.py:1.33.2.1	Tue Oct  7 01:10:31 2003
+++ ZODB3/ZODB/tests/TransactionalUndoStorage.py	Thu Oct  9 16:26:24 2003
@@ -107,7 +107,6 @@
         revid = self._dostore(oid, revid=revid, data=MinPO(25))
 
         info = self._storage.undoInfo()
-        tid = info[0]['id']
         # Now start an undo transaction
         self._undo(info[0]["id"], [oid], note="undo1")
         data, revid = self._storage.load(oid, '')
@@ -115,14 +114,12 @@
 
         # Do another one
         info = self._storage.undoInfo()
-        tid = info[2]['id']
         self._undo(info[2]["id"], [oid], note="undo2")
         data, revid = self._storage.load(oid, '')
         eq(zodb_unpickle(data), MinPO(23))
 
         # Try to undo the first record
         info = self._storage.undoInfo()
-        tid = info[4]['id']
         self._undo(info[4]["id"], [oid], note="undo3")
         # This should fail since we've undone the object's creation
         self.assertRaises(KeyError,
@@ -130,22 +127,10 @@
 
         # And now let's try to redo the object's creation
         info = self._storage.undoInfo()
-        tid = info[0]['id']
         self._undo(info[0]["id"], [oid])
         data, revid = self._storage.load(oid, '')
         eq(zodb_unpickle(data), MinPO(23))
         self._iterate()
-
-    def checkCreationUndoneGetSerial(self):
-        # create an object
-        oid = self._storage.new_oid()
-        revid = self._dostore(oid, data=MinPO(23))
-        # undo its creation
-        info = self._storage.undoInfo()
-        self._undo(info[0]["id"], [oid], note="undo1")
-        # Check that calling getSerial on an uncreated object raises a KeyError
-        # The current version of FileStorage fails this test
-        self.assertRaises(KeyError, self._storage.getSerial, oid)
 
     def checkUndoCreationBranch1(self):
         eq = self.assertEqual


=== ZODB3/ZODB/tests/testRecover.py 1.4 => 1.4.2.1 ===
--- ZODB3/ZODB/tests/testRecover.py:1.4	Thu Oct  2 14:17:17 2003
+++ ZODB3/ZODB/tests/testRecover.py	Thu Oct  9 16:26:24 2003
@@ -27,7 +27,7 @@
 from ZODB.fsrecover import recover
 from ZODB.tests.StorageTestBase import removefs
 
-from ZODB.fsdump import Dumper
+from ZODB.FileStorage.fsdump import Dumper
 
 class RecoverTest(unittest.TestCase):
 




More information about the Zope-Checkins mailing list