[Zodb-checkins] CVS: ZODB4/bsddb3Storage/tests - BerkeleyTestBase.py:1.12 test_autopack.py:1.5 test_virgin.py:1.11 test_whitebox.py:1.3 test_zodb_simple.py:1.9 timeiter.py:1.4 timepickles.py:1.3
Barry Warsaw
barry@wooz.org
Wed, 4 Dec 2002 12:11:23 -0500
Update of /cvs-repository/ZODB4/bsddb3Storage/tests
In directory cvs.zope.org:/tmp/cvs-serv16518/tests
Modified Files:
BerkeleyTestBase.py test_autopack.py test_virgin.py
test_whitebox.py test_zodb_simple.py timeiter.py
timepickles.py
Log Message:
Affect all the cosmetic changes from zodb3 -> zodb4, such as:
- referencesf is replaced by Serializ.findrefs
- U64 -> u64
- remove the referencesf argument from pack()
- PersistentMapping -> PersistentDict
Also, make the class names mirror the change to the module name.
=== ZODB4/bsddb3Storage/tests/BerkeleyTestBase.py 1.11 => 1.12 ===
--- ZODB4/bsddb3Storage/tests/BerkeleyTestBase.py:1.11 Tue Nov 19 15:39:15 2002
+++ ZODB4/bsddb3Storage/tests/BerkeleyTestBase.py Wed Dec 4 12:11:23 2002
@@ -63,10 +63,10 @@
class MinimalTestBase(BerkeleyTestBase):
- from bsddb3Storage import Minimal
- ConcreteStorage = Minimal.Minimal
+ from bsddb3Storage.BDBMinimalStorage import BDBMinimalStorage
+ ConcreteStorage = BDBMinimalStorage
class FullTestBase(BerkeleyTestBase):
- from bsddb3Storage import Full
- ConcreteStorage = Full.Full
+ from bsddb3Storage.BDBFullStorage import BDBFullStorage
+ ConcreteStorage = BDBFullStorage
=== ZODB4/bsddb3Storage/tests/test_autopack.py 1.4 => 1.5 ===
--- ZODB4/bsddb3Storage/tests/test_autopack.py:1.4 Tue Nov 19 15:39:39 2002
+++ ZODB4/bsddb3Storage/tests/test_autopack.py Wed Dec 4 12:11:23 2002
@@ -17,12 +17,11 @@
import unittest
from ZODB import DB
-from ZODB.referencesf import referencesf
from ZODB.tests.MinPO import MinPO
from Persistence import Persistent
-from bsddb3Storage.Full import Full
-from bsddb3Storage.Minimal import Minimal
+from bsddb3Storage.BDBFullStorage import BDBFullStorage
+from bsddb3Storage.BDBMinimalStorage import BDBMinimalStorage
from bsddb3Storage.BerkeleyBase import BerkeleyConfig
from bsddb3Storage.tests.BerkeleyTestBase import BerkeleyTestBase
@@ -60,7 +59,7 @@
class TestAutopack(TestAutopackBase):
- ConcreteStorage = Full
+ ConcreteStorage = BDBFullStorage
def checkAutopack(self):
unless = self.failUnless
@@ -93,7 +92,7 @@
class TestAutomaticClassicPack(TestAutopackBase):
- ConcreteStorage = Full
+ ConcreteStorage = BDBFullStorage
def _config(self):
config = BerkeleyConfig()
@@ -165,7 +164,7 @@
unless(storage.load(oid2, ''))
# Do an explicit full pack to right now to collect all the old
# revisions and the cycle.
- storage.pack(time.time(), referencesf)
+ storage.pack(time.time())
# And it should be packed away
unless(storage.load(ZERO, ''))
raises(KeyError, storage.load, oid1, '')
@@ -174,7 +173,7 @@
class TestMinimalPack(TestAutopackBase):
- ConcreteStorage = Minimal
+ ConcreteStorage = BDBMinimalStorage
def _config(self):
config = BerkeleyConfig()
=== ZODB4/bsddb3Storage/tests/test_virgin.py 1.10 => 1.11 ===
--- ZODB4/bsddb3Storage/tests/test_virgin.py:1.10 Mon Feb 11 18:40:43 2002
+++ ZODB4/bsddb3Storage/tests/test_virgin.py Wed Dec 4 12:11:23 2002
@@ -17,7 +17,7 @@
import unittest
from ZODBTestBase import ZODBTestBase
-from Persistence import PersistentMapping
+from Persistence import PersistentDict
@@ -26,7 +26,7 @@
self.failUnless(not self._root.has_key('names'))
def checkNewInserts(self):
- self._root['names'] = names = PersistentMapping()
+ self._root['names'] = names = PersistentDict()
names['Warsaw'] = 'Barry'
names['Hylton'] = 'Jeremy'
get_transaction().commit()
@@ -34,13 +34,13 @@
class FullNewInsertsTest(ZODBTestBase, InsertMixin):
- from bsddb3Storage import Full
- ConcreteStorage = Full.Full
+ from bsddb3Storage.BDBFullStorage import BDBFullStorage
+ ConcreteStorage = BDBFullStorage
class MinimalNewInsertsTest(ZODBTestBase, InsertMixin):
- from bsddb3Storage import Minimal
- ConcreteStorage = Minimal.Minimal
+ from bsddb3Storage.BDBMinimalStorage import BDBMinimalStorage
+ ConcreteStorage = BDBMinimalStorage
=== ZODB4/bsddb3Storage/tests/test_whitebox.py 1.2 => 1.3 ===
--- ZODB4/bsddb3Storage/tests/test_whitebox.py:1.2 Tue Nov 5 18:07:32 2002
+++ ZODB4/bsddb3Storage/tests/test_whitebox.py Wed Dec 4 12:11:23 2002
@@ -16,11 +16,10 @@
import unittest
-from ZODB.utils import U64
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
-from bsddb3Storage.Minimal import Minimal
-from bsddb3Storage.Full import Full
+from bsddb3Storage.BDBFullStorage import BDBFullStorage
+from bsddb3Storage.BDBMinimalStorage import BDBMinimalStorage
from bsddb3Storage.tests.BerkeleyTestBase import BerkeleyTestBase
from bsddb3Storage.tests.ZODBTestBase import ZODBTestBase
@@ -36,7 +35,7 @@
class WhiteboxLowLevelMinimal(BerkeleyTestBase):
- ConcreteStorage = Minimal
+ ConcreteStorage = BDBMinimalStorage
def checkTableConsistencyAfterCommit(self):
unless = self.failIf
@@ -80,7 +79,7 @@
class WhiteboxHighLevelMinimal(ZODBTestBase):
- ConcreteStorage = Minimal
+ ConcreteStorage = BDBMinimalStorage
def checkReferenceCounting(self):
eq = self.assertEqual
@@ -167,7 +166,7 @@
class WhiteboxHighLevelFull(ZODBTestBase):
- ConcreteStorage = Full
+ ConcreteStorage = BDBFullStorage
def checkReferenceCounting(self):
eq = self.assertEqual
=== ZODB4/bsddb3Storage/tests/test_zodb_simple.py 1.8 => 1.9 ===
--- ZODB4/bsddb3Storage/tests/test_zodb_simple.py:1.8 Fri Aug 23 13:16:12 2002
+++ ZODB4/bsddb3Storage/tests/test_zodb_simple.py Wed Dec 4 12:11:23 2002
@@ -23,14 +23,14 @@
import bsddb3
from ZODBTestBase import ZODBTestBase
-from Persistence import PersistentMapping
+from Persistence import PersistentDict
class CommitAndRead:
def checkCommit(self):
self.failUnless(not self._root)
- names = self._root['names'] = PersistentMapping()
+ names = self._root['names'] = PersistentDict()
names['Warsaw'] = 'Barry'
names['Hylton'] = 'Jeremy'
get_transaction().commit()
@@ -69,13 +69,13 @@
class MinimalCommitAndRead(ZODBTestBase, CommitAndRead):
- from bsddb3Storage import Minimal
- ConcreteStorage = Minimal.Minimal
+ from bsddb3Storage.BDBMinimalStorage import BDBMinimalStorage
+ ConcreteStorage = BDBMinimalStorage
class FullCommitAndRead(ZODBTestBase, CommitAndRead):
- from bsddb3Storage import Full
- ConcreteStorage = Full.Full
+ from bsddb3Storage.BDBFullStorage import BDBFullStorage
+ ConcreteStorage = BDBFullStorage
=== ZODB4/bsddb3Storage/tests/timeiter.py 1.3 => 1.4 ===
--- ZODB4/bsddb3Storage/tests/timeiter.py:1.3 Mon Feb 11 18:40:43 2002
+++ ZODB4/bsddb3Storage/tests/timeiter.py Wed Dec 4 12:11:23 2002
@@ -65,7 +65,7 @@
from ZODB import utils
from ZODB.TimeStamp import TimeStamp
from ZODB.FileStorage import FileStorage
-from bsddb3Storage.Full import Full
+from bsddb3Storage.BDBFullStorage import BDBFullStorage
PROGRAM = sys.argv[0]
ZERO = '\0'*8
@@ -157,7 +157,7 @@
#
print >>sys.stderr, 'Opening destination BDB...'
t0 = time.time()
- dstdb = Full(options.dest)
+ dstdb = BDBFullStorage(options.dest)
t1 = time.time()
print >>sys.stderr, 'Opening destination BDB done. %s seconds' % (t1-t0)
=== ZODB4/bsddb3Storage/tests/timepickles.py 1.2 => 1.3 ===
--- ZODB4/bsddb3Storage/tests/timepickles.py:1.2 Fri Aug 23 13:16:46 2002
+++ ZODB4/bsddb3Storage/tests/timepickles.py Wed Dec 4 12:11:23 2002
@@ -65,7 +65,7 @@
from ZODB import utils
from ZODB.TimeStamp import TimeStamp
from ZODB.FileStorage import FileStorage
-from bsddb3Storage.Full import Full
+from bsddb3Storage.BDBFullStorage import BDBFullStorage
PROGRAM = sys.argv[0]
ZERO = '\0'*8
@@ -157,7 +157,7 @@
#
print >>sys.stderr, 'Opening destination BDB...'
t0 = time.time()
-## dstdb = Full(options.dest)
+## dstdb = BDBFullStorage(options.dest)
dstdb = None
t1 = time.time()
print >>sys.stderr, 'Opening destination BDB done. %s seconds' % (t1-t0)