[Zope-Checkins] CVS: ZODB3/ZEO/tests - ConnectionTests.py:1.5 testConnection.py:1.2 testZEO.py:1.55

Guido van Rossum guido@python.org
Fri, 4 Oct 2002 20:35:26 -0400


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv27740/tests

Modified Files:
	ConnectionTests.py testConnection.py testZEO.py 
Log Message:
Merge changes from release branch into trunk.

=== ZODB3/ZEO/tests/ConnectionTests.py 1.4 => 1.5 ===
--- ZODB3/ZEO/tests/ConnectionTests.py:1.4	Thu Oct  3 13:19:39 2002
+++ ZODB3/ZEO/tests/ConnectionTests.py	Fri Oct  4 20:35:25 2002
@@ -469,7 +469,7 @@
     def checkBadMessage1(self):
         # not even close to a real message
         self._bad_message("salty")
-        
+
     def checkBadMessage2(self):
         # just like a real message, but with an unpicklable argument
         global Hack
@@ -484,7 +484,7 @@
         # Establish a connection, then send the server an ill-formatted
         # request.  Verify that the connection is closed and that it is
         # possible to establish a new connection.
-        
+
         self._storage = self.openClientStorage()
         self._dostore()
 


=== ZODB3/ZEO/tests/testConnection.py 1.1 => 1.2 ===
--- ZODB3/ZEO/tests/testConnection.py:1.1	Thu Oct  3 13:19:39 2002
+++ ZODB3/ZEO/tests/testConnection.py	Fri Oct  4 20:35:25 2002
@@ -95,7 +95,7 @@
     # shutup warnings about mktemp
     import warnings
     warnings.filterwarnings("ignore", "mktemp")
-    
+
     suite = unittest.TestSuite()
     for klass in test_classes:
         sub = unittest.makeSuite(klass, 'check')


=== ZODB3/ZEO/tests/testZEO.py 1.54 => 1.55 ===
--- ZODB3/ZEO/tests/testZEO.py:1.54	Thu Oct  3 13:36:18 2002
+++ ZODB3/ZEO/tests/testZEO.py	Fri Oct  4 20:35:25 2002
@@ -26,6 +26,7 @@
 import zLOG
 
 # ZODB test support
+import ZODB
 from ZODB.tests.MinPO import MinPO
 from ZODB.tests.StorageTestBase import zodb_unpickle
 
@@ -130,6 +131,16 @@
         self._storage.close()
         self._storage = ClientStorage(addr, read_only=read_only, wait=1)
 
+    def checkWriteMethods(self):
+        # ReadOnlyStorage defines checkWriteMethods.  The decision
+        # about where to raise the read-only error was changed after
+        # Zope 2.5 was released.  So this test needs to detect Zope
+        # of the 2.5 vintage and skip the test.
+
+        # The __version__ attribute was not present in Zope 2.5.
+        if hasattr(ZODB, "__version__"):
+            ReadOnlyStorage.ReadOnlyStorage.checkWriteMethods(self)
+
 class UnixTests(GenericTests):
 
     """Add Unix-specific scaffolding to the generic test suite."""
@@ -200,7 +211,7 @@
     # shutup warnings about mktemp
     import warnings
     warnings.filterwarnings("ignore", "mktemp")
-    
+
     suite = unittest.TestSuite()
     for klass in test_classes:
         sub = unittest.makeSuite(klass, 'check')