[Zodb-checkins] CVS: ZODB3/BDBStorage/tests - BerkeleyTestBase.py:1.19.2.1

Jeremy Hylton cvs-admin at zope.org
Sun Nov 23 16:42:25 EST 2003


Update of /cvs-repository/ZODB3/BDBStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv5543/tests

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	BerkeleyTestBase.py 
Log Message:
Thread read_only argument through open() call to actual config object.

Needed to support the ReadOnlyStorage tests.


=== ZODB3/BDBStorage/tests/BerkeleyTestBase.py 1.19 => 1.19.2.1 ===
--- ZODB3/BDBStorage/tests/BerkeleyTestBase.py:1.19	Thu Oct  2 18:14:00 2003
+++ ZODB3/BDBStorage/tests/BerkeleyTestBase.py	Sun Nov 23 16:42:24 2003
@@ -29,20 +29,21 @@
 
 
 class BerkeleyTestBase(StorageTestBase):
-    def _config(self):
+    def _config(self, read_only):
         # Checkpointing just slows the tests down because we have to wait for
         # the thread to properly shutdown.  This can take up to 10 seconds, so
         # for the purposes of the test suite we shut off this thread.
         config = BerkeleyConfig()
         config.interval = 0
+        config.read_only = read_only
         return config
 
     def _envdir(self):
         return DBHOME
 
-    def open(self):
+    def open(self, read_only=False):
         self._storage = self.ConcreteStorage(
-            self._envdir(), config=self._config())
+            self._envdir(), config=self._config(read_only))
 
     def _zap_dbhome(self, dir=None):
         if dir is None:




More information about the Zodb-checkins mailing list