[Zodb-checkins] CVS: ZODB3/ZODB/tests - TransactionalUndoVersionStorage.py:1.12.2.2

Jeremy Hylton cvs-admin at zope.org
Tue Nov 18 12:31:23 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	TransactionalUndoVersionStorage.py 
Log Message:
Extend tests to cover loadEx().


=== ZODB3/ZODB/tests/TransactionalUndoVersionStorage.py 1.12.2.1 => 1.12.2.2 ===
--- ZODB3/ZODB/tests/TransactionalUndoVersionStorage.py:1.12.2.1	Tue Oct  7 01:10:31 2003
+++ ZODB3/ZODB/tests/TransactionalUndoVersionStorage.py	Tue Nov 18 12:31:22 2003
@@ -136,6 +136,16 @@
 
         self.assertEqual(load_value(oid1), 0)
         self.assertEqual(load_value(oid1, version), 2)
+        data, serial, tid = self._storage.loadEx(oid1, "")
+        # After undoing the version commit, the non-version data
+        # once again becomes the non-version data from 'create1'.
+        self.assertEqual(tid, revid1)
+
+        # The current version data comes from an undo record, which
+        # means that it gets data via the backpointer but serial
+        # and tid from the current txn.
+        data, serial, tid = self._storage.loadEx(oid1, version)
+        self.assertEqual(tid, self._storage.lastTransaction())
 
     def checkUndoAbortVersion(self):
         def load_value(oid, version=''):




More information about the Zodb-checkins mailing list