[Zodb-checkins] CVS: Zope3/src/zodb/storage/tests - version.py:1.11
Barry Warsaw
barry at zope.com
Fri May 16 18:46:53 EDT 2003
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv22681
Modified Files:
version.py
Log Message:
Use a more modern spelling of "does this storage support undo?"
Also, since all storages (should) now support getSerial(), we can
remove the hasattr() test on that too.
=== Zope3/src/zodb/storage/tests/version.py 1.10 => 1.11 ===
--- Zope3/src/zodb/storage/tests/version.py:1.10 Mon Apr 28 12:17:50 2003
+++ Zope3/src/zodb/storage/tests/version.py Fri May 16 17:46:52 2003
@@ -53,9 +53,8 @@
eq(zodb_unpickle(data), MinPO(12))
data, vrevid = self._storage.load(oid, version)
eq(zodb_unpickle(data), MinPO(15))
- if hasattr(self._storage, 'getSerial'):
- s = self._storage.getSerial(oid)
- eq(s, max(revid, vrevid))
+ s = self._storage.getSerial(oid)
+ eq(s, max(revid, vrevid))
def testVersionedLoadErrors(self):
oid = self._storage.newObjectId()
@@ -184,9 +183,7 @@
eq(zodb_unpickle(data), MinPO(51))
def testCommitVersionErrors(self):
- if not (hasattr(self._storage, 'supportsTransactionalUndo')
- and self._storage.supportsTransactionalUndo()):
- # XXX FileStorage used to be broken on this one
+ if not IVersionStorage.isImplementedBy(self._storage):
return
eq = self.assertEqual
oid1, version1 = self._setup_version('one')
More information about the Zodb-checkins
mailing list