[Zodb-checkins] SVN: ZODB/trunk/src/Z Added missing test cleanup

Jim Fulton jim at zope.com
Sun Nov 16 10:34:12 EST 2008


Log message for revision 93010:
  Added missing test cleanup

Changed:
  U   ZODB/trunk/src/ZEO/tests/testZEO.py
  U   ZODB/trunk/src/ZEO/tests/test_cache.py
  U   ZODB/trunk/src/ZODB/FileStorage/zconfig.txt
  U   ZODB/trunk/src/ZODB/scripts/referrers.txt

-=-
Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py	2008-11-16 12:34:15 UTC (rev 93009)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py	2008-11-16 15:34:12 UTC (rev 93010)
@@ -1014,6 +1014,8 @@
     ...         self.client = client
     ...     def connect(self, sync=1):
     ...         self.client.notifyConnected(Connection(self.client))
+    ...     def close(self):
+    ...         pass
 
     >>> class StorageServer:
     ...     should_fail = True
@@ -1089,6 +1091,9 @@
     ... else: print "Should have failed"
     finish
     connection closed
+
+    >>> cs.close()
+    connection closed
     """
 
 slow_test_classes = [

Modified: ZODB/trunk/src/ZEO/tests/test_cache.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/test_cache.py	2008-11-16 12:34:15 UTC (rev 93009)
+++ ZODB/trunk/src/ZEO/tests/test_cache.py	2008-11-16 15:34:12 UTC (rev 93010)
@@ -73,6 +73,7 @@
         self.cache = ZEO.cache.ClientCache(size=1024**2)
 
     def tearDown(self):
+        self.cache.close()
         if self.cache.path:
             os.remove(self.cache.path)
         ZODB.tests.util.TestCase.tearDown(self)

Modified: ZODB/trunk/src/ZODB/FileStorage/zconfig.txt
===================================================================
--- ZODB/trunk/src/ZODB/FileStorage/zconfig.txt	2008-11-16 12:34:15 UTC (rev 93009)
+++ ZODB/trunk/src/ZODB/FileStorage/zconfig.txt	2008-11-16 15:34:12 UTC (rev 93010)
@@ -128,6 +128,7 @@
     >>> fs.pack(time.time(), 42, gc=True)
     42 True True
     
+    >>> fs.close()
 
 
 

Modified: ZODB/trunk/src/ZODB/scripts/referrers.txt
===================================================================
--- ZODB/trunk/src/ZODB/scripts/referrers.txt	2008-11-16 12:34:15 UTC (rev 93009)
+++ ZODB/trunk/src/ZODB/scripts/referrers.txt	2008-11-16 15:34:12 UTC (rev 93010)
@@ -38,3 +38,6 @@
     >>> referrers[boid] == [(roid, s1), (aoid, s2)]
     True
 
+.. Cleanup
+
+    >>> db.close()



More information about the Zodb-checkins mailing list