[Checkins] SVN: zc.monitor/trunk/src/zc/monitor/README.txt Changed the tests to create new connections rather than using closed

Jim Fulton jim at zope.com
Wed Oct 28 13:32:59 EDT 2009


Log message for revision 105339:
  Changed the tests to create new connections rather than using closed
  connections. Apparentlu. NGI ignored a test connections closed state
  and doesn't now. The current ngi behavior is an improvement, although
  it should probably raise an exception when writing to a closed
  connection.
  

Changed:
  U   zc.monitor/trunk/src/zc/monitor/README.txt

-=-
Modified: zc.monitor/trunk/src/zc/monitor/README.txt
===================================================================
--- zc.monitor/trunk/src/zc/monitor/README.txt	2009-10-28 17:06:21 UTC (rev 105338)
+++ zc.monitor/trunk/src/zc/monitor/README.txt	2009-10-28 17:32:58 UTC (rev 105339)
@@ -39,6 +39,8 @@
 
 We can pass a name:
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('hello Jim\n')
     Hi Jim, nice to meet ya!
     -> CLOSE
@@ -56,6 +58,8 @@
 The first is the help command.  Giving help without input, gives a
 list of available commands:
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('help\n')
     Supported commands:
       hello -- Say hello
@@ -66,6 +70,8 @@
 
 We can get detailed help by specifying a command name:
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('help help\n')
     Help for help:
     <BLANKLINE>
@@ -76,6 +82,8 @@
     <BLANKLINE>
     -> CLOSE
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('help hello\n')
     Help for hello:
     <BLANKLINE>
@@ -91,6 +99,8 @@
 the ``quit`` command is used.  This can be useful when accessing the monitor
 via telnet for diagnostics.
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('interactive\n')
     Interactive mode on.  Use "quit" To exit.
     >>> connection.test_input('help interactive\n')
@@ -136,6 +146,8 @@
 Finally, it's worth noting that exceptions will generate a
 traceback on the connection.
 
+    >>> connection = zc.ngi.testing.TextConnection()
+    >>> server = zc.monitor.Server(connection)
     >>> connection.test_input('hello Jim 42\n') # doctest: +ELLIPSIS
     Traceback (most recent call last):
     ...



More information about the checkins mailing list