Commit 8d5938be authored by Jeremy Hylton's avatar Jeremy Hylton

Remove dependency on StorageTestBase setUp() and tearDown().

parent a8b6c61d
......@@ -10,16 +10,13 @@ import ZODB, ZODB.FileStorage
from StorageTestBase import StorageTestBase
class FileStorageCorruptTests(StorageTestBase):
__super_setUp = StorageTestBase.setUp
__super_tearDown = StorageTestBase.tearDown
def setUp(self):
self.__super_setUp()
self.path = tempfile.mktemp()
self._storage = ZODB.FileStorage.FileStorage(self.path, create=1)
def tearDown(self):
self.__super_tearDown()
self._storage.close()
for ext in '', '.old', '.tmp', '.lock', '.index':
path = self.path + ext
if os.path.exists(path):
......
......@@ -11,9 +11,11 @@ class DemoStorageTests(StorageTestBase.StorageTestBase,
):
def setUp(self):
StorageTestBase.StorageTestBase.setUp(self)
self._storage = ZODB.DemoStorage.DemoStorage()
def tearDown(self):
self._storage.close()
def test_suite():
suite = unittest.makeSuite(DemoStorageTests, 'check')
return suite
......
......@@ -9,9 +9,11 @@ class MappingStorageTests(StorageTestBase.StorageTestBase,
):
def setUp(self):
StorageTestBase.StorageTestBase.setUp(self)
self._storage = ZODB.MappingStorage.MappingStorage()
def tearDown(self):
self._storage.close()
def test_suite():
suite = unittest.makeSuite(MappingStorageTests, 'check')
return suite
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment