[Zodb-checkins] CVS: ZODB4/src/zodb/storage/tests - test_whitebox.py:1.4

Barry Warsaw barry@wooz.org
Fri, 24 Jan 2003 13:58:45 -0500


Update of /cvs-repository/ZODB4/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv8581

Modified Files:
	test_whitebox.py 
Log Message:
Add whitebox tests of the storage level version information.


=== ZODB4/src/zodb/storage/tests/test_whitebox.py 1.3 => 1.4 ===
--- ZODB4/src/zodb/storage/tests/test_whitebox.py:1.3	Wed Jan 22 15:57:38 2003
+++ ZODB4/src/zodb/storage/tests/test_whitebox.py	Fri Jan 24 13:58:42 2003
@@ -76,6 +76,14 @@
         # stored object isn't referenced by any other objects.
         eq(len(self._storage._refcounts.keys()), 0)
 
+    def checkStorageVersionAfterCreation(self):
+        from zodb.storage.bdbminimal import BDBMINIMAL_SCHEMA_VERSION
+        eq = self.assertEqual
+        eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+        self._storage.close()
+        self._open()
+        eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+
 
 
 class WhiteboxHighLevelMinimal(ZODBTestBase):
@@ -162,6 +170,20 @@
         # And of course, oids and pendings should be empty too
         eq(len(self._storage._oids.keys()), 0)
         eq(len(self._storage._pending.keys()), 0)
+
+
+
+class WhiteboxLowLevelFull(BerkeleyTestBase):
+    ConcreteStorage = BDBFullStorage
+
+    def checkStorageVersionAfterCreation(self):
+        from zodb.storage.bdbminimal import BDBMINIMAL_SCHEMA_VERSION
+        eq = self.assertEqual
+        eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+        self._storage.close()
+        self._open()
+        eq(self._storage._info['version'], BDBMINIMAL_SCHEMA_VERSION)
+