[Zodb-checkins] CVS: ZODB3/ZODB/tests - ReadOnlyStorage.py:1.7.2.1
Jeremy Hylton
cvs-admin at zope.org
Mon Nov 24 13:33:37 EST 2003
Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv25244
Modified Files:
Tag: ZODB3-mvcc-2-branch
ReadOnlyStorage.py
Log Message:
Allow checkReadMethods to pass for BDBMinimalStorage.
=== ZODB3/ZODB/tests/ReadOnlyStorage.py 1.7 => 1.7.2.1 ===
--- ZODB3/ZODB/tests/ReadOnlyStorage.py:1.7 Thu Oct 2 14:17:17 2003
+++ ZODB3/ZODB/tests/ReadOnlyStorage.py Mon Nov 24 13:33:36 2003
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from ZODB.POSException import ReadOnlyError
+from ZODB.POSException import ReadOnlyError, Unsupported
from ZODB.Transaction import Transaction
class ReadOnlyStorage:
@@ -37,8 +37,12 @@
data, revid = self._storage.load(oid, '')
self.assertEqual(revid, self.oids[oid])
self.assert_(not self._storage.modifiedInVersion(oid))
- _data = self._storage.loadSerial(oid, revid)
- self.assertEqual(data, _data)
+ # Storages without revisions may not have loadSerial().
+ try:
+ _data = self._storage.loadSerial(oid, revid)
+ self.assertEqual(data, _data)
+ except Unsupported:
+ pass
def checkWriteMethods(self):
self._make_readonly()
More information about the Zodb-checkins
mailing list