[Zodb-checkins] CVS: Zope/lib/python/ZODB/tests - HistoryStorage.py:1.8.28.1 PersistentStorage.py:1.4.28.1 ReadOnlyStorage.py:1.5.28.1

Toby Dickenson tdickenson at geminidataloggers.com
Wed May 14 17:51:03 EDT 2003


Update of /cvs-repository/Zope/lib/python/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv27487/tests

Modified Files:
      Tag: toby_directorystorage_tests_branch
	HistoryStorage.py PersistentStorage.py ReadOnlyStorage.py 
Log Message:
support for storages that do not have versions, such as DirectoryStorage

=== Zope/lib/python/ZODB/tests/HistoryStorage.py 1.8 => 1.8.28.1 ===
--- Zope/lib/python/ZODB/tests/HistoryStorage.py:1.8	Thu Dec  5 19:00:53 2002
+++ Zope/lib/python/ZODB/tests/HistoryStorage.py	Wed May 14 16:51:01 2003
@@ -72,6 +72,8 @@
         eq(d['version'], '')
 
     def checkVersionHistory(self):
+        if not self._storage.supportsVersions():
+            return
         eq = self.assertEqual
         # Store a couple of non-version revisions
         oid = self._storage.new_oid()
@@ -110,6 +112,8 @@
         eq(d['version'], '')
 
     def checkHistoryAfterVersionCommit(self):
+        if not self._storage.supportsVersions():
+            return
         eq = self.assertEqual
         # Store a couple of non-version revisions
         oid = self._storage.new_oid()
@@ -168,6 +172,8 @@
         eq(d['version'], '')
 
     def checkHistoryAfterVersionAbort(self):
+        if not self._storage.supportsVersions():
+            return
         eq = self.assertEqual
         # Store a couple of non-version revisions
         oid = self._storage.new_oid()


=== Zope/lib/python/ZODB/tests/PersistentStorage.py 1.4 => 1.4.28.1 ===
--- Zope/lib/python/ZODB/tests/PersistentStorage.py:1.4	Fri Dec  6 14:01:40 2002
+++ Zope/lib/python/ZODB/tests/PersistentStorage.py	Wed May 14 16:51:01 2003
@@ -28,7 +28,8 @@
         self._dostore()
         oid = self._storage.new_oid()
         revid = self._dostore(oid)
-        self._dostore(oid, revid, data=8, version='b')
+        if self._storage.supportsVersions():
+            self._dostore(oid, revid, data=8, version='b')
         oid = self._storage.new_oid()
         revid = self._dostore(oid, data=1)
         revid = self._dostore(oid, revid, data=2)


=== Zope/lib/python/ZODB/tests/ReadOnlyStorage.py 1.5 => 1.5.28.1 ===
--- Zope/lib/python/ZODB/tests/ReadOnlyStorage.py:1.5	Thu Dec  5 19:00:53 2002
+++ Zope/lib/python/ZODB/tests/ReadOnlyStorage.py	Wed May 14 16:51:01 2003
@@ -46,10 +46,12 @@
         t = Transaction()
         self.assertRaises(ReadOnlyError, self._storage.tpc_begin, t)
 
-        self.assertRaises(ReadOnlyError, self._storage.abortVersion,
-                          '', t)
-        self.assertRaises(ReadOnlyError, self._storage.commitVersion,
-                          '', '', t)
+        if self._storage.supportsVersions():
+            self.assertRaises(ReadOnlyError, self._storage.abortVersion,
+                              '', t)
+            self.assertRaises(ReadOnlyError, self._storage.commitVersion,
+                              '', '', t)
+
         self.assertRaises(ReadOnlyError, self._storage.store,
                           '\000' * 8, None, '', '', t)
 




More information about the Zodb-checkins mailing list