[Zodb-checkins] CVS: ZODB3/ZEO/tests - testConnection.py:1.6
Barry Warsaw
barry@wooz.org
Mon, 16 Dec 2002 18:35:11 -0500
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv26880
Modified Files:
testConnection.py
Log Message:
Back porting fixes from zodb4 to specify a `keep' flag on the
storage's artifacts. Some tests expect to reconnect in read-only mode
to a previously created storage.
=== ZODB3/ZEO/tests/testConnection.py 1.5 => 1.6 ===
--- ZODB3/ZEO/tests/testConnection.py:1.5 Thu Dec 12 14:06:17 2002
+++ ZODB3/ZEO/tests/testConnection.py Mon Dec 16 18:35:11 2002
@@ -20,12 +20,10 @@
# System imports
import unittest
# Import the actual test class
-from ZEO.tests.ConnectionTests import ConnectionTests
+from ZEO.tests import ConnectionTests
-class FileStorageConnectionTests(ConnectionTests):
- """Add FileStorage-specific test."""
-
+class FileStorageConfig:
def getConfig(self, path, create, read_only):
return """\
<Storage>
@@ -38,9 +36,7 @@
read_only and 'yes' or 'no')
-class BDBConnectionTests(FileStorageConnectionTests):
- """Berkeley storage tests."""
-
+class BerkeleyStorageConfig:
def getConfig(self, path, create, read_only):
# Full always creates and doesn't have a read_only flag
return """\
@@ -51,13 +47,42 @@
</Storage>""" % (path, read_only)
-test_classes = [FileStorageConnectionTests]
+class FileStorageConnectionTests(
+ FileStorageConfig,
+ ConnectionTests.ConnectionTests
+ ):
+ """FileStorage-specific connection tests."""
+
+
+class FileStorageReconnectionTests(
+ FileStorageConfig,
+ ConnectionTests.ReconnectionTests
+ ):
+ """FileStorage-specific re-connection tests."""
+
+
+class BDBConnectionTests(
+ BerkeleyStorageConfig,
+ ConnectionTests.ConnectionTests
+ ):
+ """Berkeley storage connection tests."""
+
+
+class BDBReconnectionTests(
+ BerkeleyStorageConfig,
+ ConnectionTests.ReconnectionTests
+ ):
+ """Berkeley storage re-connection tests."""
+
+
+test_classes = [FileStorageConnectionTests, FileStorageReconnectionTests]
try:
from bsddb3Storage.Full import Full
except ImportError:
pass
else:
test_classes.append(BDBConnectionTests)
+ test_classes.append(BDBReconnectionTests)
def test_suite():