[Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/README.txt Make some doctests a bit more doc that test ; -)

Chris Withers chris at simplistix.co.uk
Thu Nov 24 11:16:33 EST 2005


Log message for revision 40362:
  Make some doctests a bit more doc that test ;-)

Changed:
  U   Zope3/trunk/src/zope/testbrowser/README.txt

-=-
Modified: Zope3/trunk/src/zope/testbrowser/README.txt
===================================================================
--- Zope3/trunk/src/zope/testbrowser/README.txt	2005-11-24 15:47:28 UTC (rev 40361)
+++ Zope3/trunk/src/zope/testbrowser/README.txt	2005-11-24 16:16:33 UTC (rev 40362)
@@ -794,16 +794,40 @@
 
   - Radio Control
 
+    This is how you get a radio button based control:
+
     >>> ctrl = browser.getControl(name='radio-value')
-    >>> ctrl
-    <ListControl name='radio-value' type='radio'>
-    >>> verifyObject(interfaces.IListControl, ctrl)
-    True
+
+    This shows the existing value of the control, as it was in the
+    html recieved from the server:
+
     >>> ctrl.value
     ['2']
+
+    We can then unselect it:
+
     >>> ctrl.value = []
     >>> ctrl.value
     []
+
+    We can also reselect it:
+
+    >>> ctrl.value = ['2']
+    >>> ctrl.value
+    ['2']
+
+    displayValue shows the text the user would see next to the
+    control: 
+
+    >>> ctrl.displayValue
+    ['Zwei']
+
+    This is just unit testing:
+
+    >>> ctrl
+    <ListControl name='radio-value' type='radio'>
+    >>> verifyObject(interfaces.IListControl, ctrl)
+    True
     >>> ctrl.disabled
     False
     >>> ctrl.multiple
@@ -812,9 +836,9 @@
     ['1', '2', '3']
     >>> ctrl.displayOptions
     ['Ein', 'Zwei', 'Drei']
-    >>> ctrl.displayValue
-    []
     >>> ctrl.displayValue = ['Ein']
+    >>> ctrl.value
+    ['1']
     >>> ctrl.displayValue
     ['Ein']
 



More information about the Zope3-Checkins mailing list