Commit 65e022fd authored by Jim Fulton's avatar Jim Fulton

Added standard setup and teardown.

parent 54b6e14c
...@@ -18,14 +18,16 @@ import unittest ...@@ -18,14 +18,16 @@ import unittest
import transaction import transaction
import ZODB.config import ZODB.config
import ZODB.tests.util
from ZODB.POSException import ReadOnlyError from ZODB.POSException import ReadOnlyError
class ConfigTestBase(unittest.TestCase): class ConfigTestBase(ZODB.tests.util.TestCase):
def _opendb(self, s): def _opendb(self, s):
return ZODB.config.databaseFromString(s) return ZODB.config.databaseFromString(s)
def tearDown(self): def tearDown(self):
ZODB.tests.util.TestCase.tearDown(self)
if getattr(self, "storage", None) is not None: if getattr(self, "storage", None) is not None:
self.storage.cleanup() self.storage.cleanup()
...@@ -222,7 +224,8 @@ def multi_atabases(): ...@@ -222,7 +224,8 @@ def multi_atabases():
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(doctest.DocTestSuite()) suite.addTest(doctest.DocTestSuite(
setUp=ZODB.tests.util.setUp, tearDown=ZODB.tests.util.tearDown))
suite.addTest(unittest.makeSuite(ZODBConfigTest)) suite.addTest(unittest.makeSuite(ZODBConfigTest))
suite.addTest(unittest.makeSuite(ZEOConfigTest)) suite.addTest(unittest.makeSuite(ZEOConfigTest))
return suite 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