[Zope3-checkins] CVS: Zope3/src/zodb/storage/tests - corruption.py:1.1.2.2 mt.py:1.1.2.2 speed.py:1.1.2.2 test_config.py:1.1.2.3 test_file.py:1.1.2.5
Barry Warsaw
barry@wooz.org
Mon, 23 Dec 2002 18:49:14 -0500
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv1791/src/zodb/storage/tests
Modified Files:
Tag: NameGeddon-branch
corruption.py mt.py speed.py test_config.py test_file.py
Log Message:
more fixes
move threadedasync.py from the top level into zodb/zeo since it was
causing problems otherwise, and it's only used by zeo now.
=== Zope3/src/zodb/storage/tests/corruption.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/corruption.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/corruption.py Mon Dec 23 18:48:43 2002
@@ -19,14 +19,14 @@
import tempfile
import unittest
-import ZODB, ZODB.FileStorage
+from zodb.storage.file import FileStorage
from zodb.storage.tests.base import StorageTestBase
class FileStorageCorruptTests(StorageTestBase):
def setUp(self):
self.path = tempfile.mktemp()
- self._storage = ZODB.FileStorage.FileStorage(self.path, create=1)
+ self._storage = FileStorage(self.path, create=1)
def tearDown(self):
self._storage.close()
@@ -62,7 +62,7 @@
f.truncate()
f.close()
- self._storage = ZODB.FileStorage.FileStorage(self.path)
+ self._storage = FileStorage(self.path)
self._check_stores(oids)
def checkCorruptedIndex(self):
@@ -79,5 +79,5 @@
f.write('\000')
f.close()
- self._storage = ZODB.FileStorage.FileStorage(self.path)
+ self._storage = FileStorage(self.path)
self._check_stores(oids)
=== Zope3/src/zodb/storage/tests/mt.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/mt.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/mt.py Mon Dec 23 18:48:43 2002
@@ -189,11 +189,11 @@
self.failIf(t.isAlive(), "thread failed to finish in 60 seconds")
def check2ZODBThreads(self):
- db = ZODB.DB.DB(self._storage)
+ db = zodb.db.DB(self._storage)
self._checkNThreads(2, ZODBClientThread, db, self)
def check7ZODBThreads(self):
- db = ZODB.DB.DB(self._storage)
+ db = zodb.db.DB(self._storage)
self._checkNThreads(7, ZODBClientThread, db, self)
def check2StorageThreads(self):
=== Zope3/src/zodb/storage/tests/speed.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/speed.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/speed.py Mon Dec 23 18:48:43 2002
@@ -38,7 +38,8 @@
import sys, os, getopt, string, time
sys.path.insert(0, os.getcwd())
-import ZODB.DB, ZODB.FileStorage
+import zodb.db
+from zodb.storage.file import FileStorage
import persistence
from transaction import get_transaction
@@ -73,10 +74,10 @@
s=__import__(s, globals(), globals(), ('__doc__',))
s=s.Storage
else:
- s=ZODB.FileStorage.FileStorage('zeo_speed.fs', create=1)
+ s=FileStorage('zeo_speed.fs', create=1)
data=open(data).read()
- db=ZODB.DB.DB(s, cache_size=4000)
+ db=zodb.db.DB(s, cache_size=4000)
results={1:0, 10:0, 100:0, 1000:0}
for j in range(nrep):
for r in 1, 10, 100, 1000:
=== Zope3/src/zodb/storage/tests/test_config.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zodb/storage/tests/test_config.py:1.1.2.2 Mon Dec 23 17:01:07 2002
+++ Zope3/src/zodb/storage/tests/test_config.py Mon Dec 23 18:48:43 2002
@@ -93,7 +93,7 @@
from zodb.storage.mapping import MappingStorage
sample = """
<Storage>
- type ZODB.MappingStorage.MappingStorage
+ type zodb.storage.mapping.MappingStorage
</Storage>
"""
io = StringIO(sample)
=== Zope3/src/zodb/storage/tests/test_file.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zodb/storage/tests/test_file.py:1.1.2.4 Mon Dec 23 17:53:33 2002
+++ Zope3/src/zodb/storage/tests/test_file.py Mon Dec 23 18:48:43 2002
@@ -45,8 +45,8 @@
):
def open(self, **kwargs):
- self._storage = zodb.storages.file.FileStorage('FileStorageTests.fs',
- **kwargs)
+ self._storage = zodb.storage.file.FileStorage('FileStorageTests.fs',
+ **kwargs)
def setUp(self):
base.removefs("FileStorageTests.fs")
@@ -79,8 +79,8 @@
def setUp(self):
base.removefs("Source.fs")
base.removefs("Dest.fs")
- self._storage = zodb.storages.file.FileStorage('Source.fs')
- self._dst = zodb.storages.file.FileStorage('Dest.fs')
+ self._storage = zodb.storage.file.FileStorage('Source.fs')
+ self._dst = zodb.storage.file.FileStorage('Dest.fs')
def tearDown(self):
self._storage.close()
@@ -90,7 +90,7 @@
def new_dest(self):
base.removefs('Dest.fs')
- return zodb.storages.file.FileStorage('Dest.fs')
+ return zodb.storage.file.FileStorage('Dest.fs')
def test_suite():
suite = unittest.makeSuite(FileStorageTests, 'check')