[Zope3-checkins] CVS: ZODB4/src/zodb/storage/tests - undo.py:1.16.6.2

Jeremy Hylton jeremy@zope.com
Thu, 19 Jun 2003 15:19:41 -0400


Update of /cvs-repository/ZODB4/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv27978

Modified Files:
      Tag: ZODB3-2-merge
	undo.py 
Log Message:
Add a test from ZODB3 but leave it commented out for now.


=== ZODB4/src/zodb/storage/tests/undo.py 1.16.6.1 => 1.16.6.2 ===
--- ZODB4/src/zodb/storage/tests/undo.py:1.16.6.1	Thu Jun 19 15:09:31 2003
+++ ZODB4/src/zodb/storage/tests/undo.py	Thu Jun 19 15:19:40 2003
@@ -156,6 +156,27 @@
         eq(zodb_unpickle(data), MinPO(23))
         self._iterate()
 
+##    def testCreationUndoneGetSerial(self):
+##        # XXX Do we really want to change FileStorage to make this test
+##        # pass?  getSerial() is nice and fast right now.
+        
+##        # create an object
+##        oid = self._storage.newObjectId()
+##        revid = self._dostore(oid, data=MinPO(23))
+##        print repr(revid)
+##        # undo its creation
+##        info = self._storage.undoInfo()
+##        tid = info[0]['id']
+##        t = Transaction()
+##        t.note('undo1')
+##        self._storage.tpcBegin(t)
+##        oids = self._storage.undo(tid, t)
+##        self._storage.tpcVote(t)
+##        self._storage.tpcFinish(t)
+##        # 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 testUndoCreationBranch1(self):
         eq = self.assertEqual
         oid = self._storage.newObjectId()