[Checkins] SVN: zc.zk/trunk/ Added missing doc and test for close

Jim Fulton jim at zope.com
Sun Nov 27 20:15:57 UTC 2011


Log message for revision 123499:
  Added missing doc and test for close
  

Changed:
  U   zc.zk/trunk/README.txt
  U   zc.zk/trunk/src/zc/zk/tests.py

-=-
Modified: zc.zk/trunk/README.txt
===================================================================
--- zc.zk/trunk/README.txt	2011-11-27 20:15:55 UTC (rev 123498)
+++ zc.zk/trunk/README.txt	2011-11-27 20:15:56 UTC (rev 123499)
@@ -1,14 +1,4 @@
-Title Here
-**********
+High-level ZooKeeper API
+************************
 
-
-To learn more, see
-
-
-Changes
-*******
-
-0.1.0 (yyyy-mm-dd)
-==================
-
-Initial release
+See the README.txt in the zc.zk package.

Modified: zc.zk/trunk/src/zc/zk/tests.py
===================================================================
--- zc.zk/trunk/src/zc/zk/tests.py	2011-11-27 20:15:55 UTC (rev 123498)
+++ zc.zk/trunk/src/zc/zk/tests.py	2011-11-27 20:15:56 UTC (rev 123499)
@@ -60,6 +60,12 @@
         self.assertEqual(handle, self.__zk.handle)
         return zookeeper.CONNECTED_STATE
 
+    @mock.patch('zookeeper.close')
+    def test_close(self, close):
+        self.__zk.close()
+        close.assert_called_with(0)
+        self.assertEqual(self.__zk.handle, None)
+
     @mock.patch('zookeeper.create')
     def test_register_server(self, create):
         @side_effect(create)
@@ -352,10 +358,10 @@
 
 def test_suite():
     return unittest.TestSuite((
-        unittest.makeSuite(LoggingTests),
         unittest.makeSuite(Tests),
         doctest.DocFileSuite(
             'README.txt',
             setUp=setup, tearDown=zope.testing.setupstack.tearDown
             ),
+        unittest.makeSuite(LoggingTests),
         ))



More information about the checkins mailing list