[Zodb-checkins] CVS: ZODB3/ZODB/tests - RevisionStorage.py:1.4.2.6
Jeremy Hylton
cvs-admin at zope.org
Tue Nov 25 12:36:26 EST 2003
Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv23005/ZODB/tests
Modified Files:
Tag: ZODB3-mvcc-2-branch
RevisionStorage.py
Log Message:
Temporary fix for checkLoadNonCurrentUndo().
Don't ask about the specific value of the serial number, just ask
whether it gets the right pickle.
=== ZODB3/ZODB/tests/RevisionStorage.py 1.4.2.5 => 1.4.2.6 ===
--- ZODB3/ZODB/tests/RevisionStorage.py:1.4.2.5 Tue Nov 25 00:47:20 2003
+++ ZODB3/ZODB/tests/RevisionStorage.py Tue Nov 25 12:36:25 2003
@@ -110,7 +110,7 @@
tid = info[0]["id"]
# Always undo the most recent txn, so the value will
# alternate between 3 and 4.
- self._undo(tid, [oid])
+ self._undo(tid, [oid], note="undo %d" % i)
revs.append(self._storage.loadEx(oid, ""))
prev_tid = None
@@ -125,8 +125,13 @@
self.assertEqual(revs[i+1][2], t[3])
else:
self.assertEqual(None, t[3])
- # XXX Decide what the serial number should be and write it
- # into the test.
-## self.assertEqual(serial, t[1])
+
+ # The API doesn't say exactly what the serial number
+ # should be, only that it should return the right
+ # data and be less than the current serial number.
+
+ data1 = self._storage.loadSerial(oid, serial)
+ data2 = self._storage.loadSerial(oid, t[1])
+ self.assertEqual(data1, data2)
# XXX There are other edge cases to handle, including pack.
More information about the Zodb-checkins
mailing list