[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests - test_datetimewidget.py:1.2.24.1 test_datewidget.py:1.2.24.1 test_filewidget.py:1.7.24.2 test_floatwidget.py:1.2.24.1 test_intwidget.py:1.2.24.1 test_listwidget.py:1.8.24.2 test_multicheckboxwidget.py:1.8.24.2 test_multilistwidget.py:1.8.24.2 test_objectwidget.py:1.5.12.1 test_passwordwidget.py:1.8.24.2 test_radiowidget.py:1.10.24.2 test_sequencewidget.py:1.6.10.1 test_textareawidget.py:1.9.24.2 test_textwidget.py:1.7.24.2

Dave Fregon axxs at axxs.org
Sun Feb 8 02:02:30 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv25171/src/zope/app/browser/form/tests

Modified Files:
      Tag: ozzope-widgets-branch
	test_datetimewidget.py test_datewidget.py test_filewidget.py 
	test_floatwidget.py test_intwidget.py test_listwidget.py 
	test_multicheckboxwidget.py test_multilistwidget.py 
	test_objectwidget.py test_passwordwidget.py 
	test_radiowidget.py test_sequencewidget.py 
	test_textareawidget.py test_textwidget.py 
Log Message:
Added doctests to verify widgets interfaces


=== Zope3/src/zope/app/browser/form/tests/test_datetimewidget.py 1.2 => 1.2.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_datetimewidget.py:1.2	Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_datetimewidget.py	Sun Feb  8 02:02:28 2004
@@ -14,15 +14,26 @@
 """
 $Id$
 """
+import doctest
 from unittest import main, makeSuite
 from zope.app.datetimeutils import parseDatetimetz
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 from zope.app.browser.form.widget import DatetimeWidget
 from zope.app.interfaces.form import ConversionError, WidgetInputError
+from zope.interface.verify import verifyClass, verifyObject
+
 from zope.schema import Datetime
 
 
 class DatetimeWidgetTest(BrowserWidgetTest):
+    """
+    DatetimeWidget implements IDatetimeWidget, which is an edit widget type:
+        
+        >>> verifyClass(IDatetimeWidget, DatetimeWidget)
+        True
+        >>> IDatetimeWidget.extends(IEditWidget)
+        True
+    """
 
     _FieldFactory = Datetime
     _WidgetFactory = DatetimeWidget


=== Zope3/src/zope/app/browser/form/tests/test_datewidget.py 1.2 => 1.2.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_datewidget.py:1.2	Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_datewidget.py	Sun Feb  8 02:02:28 2004
@@ -14,15 +14,24 @@
 """
 $Id$
 """
+import doctest
 from unittest import main, makeSuite
 from zope.app.datetimeutils import parseDatetimetz
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 from zope.app.browser.form.widget import DateWidget
 from zope.app.interfaces.form import ConversionError, WidgetInputError
 from zope.schema import Date
-
+from zope.interface.verify import verifyClass, verifyObject
 
 class DateWidgetTest(BrowserWidgetTest):
+    """
+    DateWidget implements IDateWidget, which is an edit widget type:
+        
+        >>> verifyClass(IDateWidget, DateWidget)
+        True
+        >>> IDateWidget.extends(IEditWidget)
+        True
+    """
 
     _FieldFactory = Date
     _WidgetFactory = DateWidget


=== Zope3/src/zope/app/browser/form/tests/test_filewidget.py 1.7.24.1 => 1.7.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_filewidget.py:1.7.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_filewidget.py	Sun Feb  8 02:02:28 2004
@@ -14,14 +14,24 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from StringIO import StringIO
 from zope.app.browser.form.widget import FileWidget
 
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 
+from zope.interface.verify import verifyClass, verifyObject
+
 class FileWidgetTest(BrowserWidgetTest):
+    """
+    FileWidget implements IFileWidget, which is an edit widget type:
+        
+        >>> verifyClass(IFileWidget, FileWidget)
+        True
+        >>> IFileWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = FileWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_floatwidget.py 1.2 => 1.2.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_floatwidget.py:1.2	Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_floatwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,14 +14,25 @@
 """
 $Id$
 """
+import doctest
 from unittest import main, makeSuite
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 from zope.app.browser.form.widget import FloatWidget
 from zope.app.interfaces.form import ConversionError, WidgetInputError
+from zope.interface.verify import verifyClass, verifyObject
+
 from zope.schema import Float
 
 
 class FloatWidgetTest(BrowserWidgetTest):
+    """
+    FloatWidget implements IFloatWidget, which is an edit widget type:
+        
+        >>> verifyClass(IFloatWidget, FloatWidget)
+        True
+        >>> IFloatWidget.extends(IEditWidget)
+        True
+    """
 
     _FieldFactory = Float
     _WidgetFactory = FloatWidget


=== Zope3/src/zope/app/browser/form/tests/test_intwidget.py 1.2 => 1.2.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_intwidget.py:1.2	Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_intwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,14 +14,25 @@
 """
 $Id$
 """
+import doctest
 from unittest import main, makeSuite
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 from zope.app.browser.form.widget import IntWidget
 from zope.app.interfaces.form import ConversionError, WidgetInputError
+from zope.interface.verify import verifyClass, verifyObject
+
 from zope.schema import Int
 
 
 class IntWidgetTest(BrowserWidgetTest):
+    """
+    IntWidget implements IIntWidget, which is an edit widget type:
+        
+        >>> verifyClass(IIntWidget, IntWidget)
+        True
+        >>> IIntWidget.extends(IEditWidget)
+        True
+    """
 
     _FieldFactory = Int
     _WidgetFactory = IntWidget


=== Zope3/src/zope/app/browser/form/tests/test_listwidget.py 1.8.24.1 => 1.8.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_listwidget.py:1.8.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_listwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,12 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import ListWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
+from zope.interface.verify import verifyClass, verifyObject
 
 class ListWidgetTest(BrowserWidgetTest):
+    """
+    ListWidget implements IListWidget, which is an edit widget type:
+        
+        >>> verifyClass(IListWidget, ListWidget)
+        True
+        >>> IListWidget.extends(IEditWidget)
+        True
+    """
 
     def setUp(self):
         BrowserWidgetTest.setUp(self)


=== Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py 1.8.24.1 => 1.8.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py:1.8.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,12 +14,22 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import MultiCheckBoxWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
+from zope.interface.verify import verifyClass, verifyObject
 
 class MultiCheckBoxWidgetTest(BrowserWidgetTest):
+    """
+    MultiCheckBoxWidget implements IMultiCheckBoxWidget, which is an edit 
+    widget type:
+        
+        >>> verifyClass(IMultiCheckBoxWidget, MultiCheckBoxWidget)
+        True
+        >>> IMultiCheckBoxWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = MultiCheckBoxWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py 1.8.24.1 => 1.8.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py:1.8.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,12 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import MultiListWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
+from zope.interface.verify import verifyClass, verifyObject
 
 class MultiListWidgetTest(BrowserWidgetTest):
+    """
+    MultiListWidget implements IMultiListWidget, which is an edit widget type:
+        
+        >>> verifyClass(IMultiListWidget, MultiListWidget)
+        True
+        >>> IMultiListWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = MultiListWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_objectwidget.py 1.5 => 1.5.12.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_objectwidget.py:1.5	Fri Nov 21 12:11:56 2003
+++ Zope3/src/zope/app/browser/form/tests/test_objectwidget.py	Sun Feb  8 02:02:28 2004
@@ -15,7 +15,7 @@
 $Id$
 """
 
-import unittest
+import unittest, doctest
 
 from zope.app.tests import ztapi
 from zope.interface import Interface, implements
@@ -23,6 +23,7 @@
 from zope.publisher.browser import TestRequest
 from zope.schema import Object, TextLine
 from zope.app.browser.form.widget import TextWidget, ObjectWidget
+from zope.interface.verify import verifyClass, verifyObject
 
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 
@@ -33,6 +34,15 @@
     implements(ITestContact)
 
 class ObjectWidgetTest(BrowserWidgetTest):
+    """
+    ObjectWidget implements IObjectWidget, which is an edit widget type:
+        
+        >>> verifyClass(IObjectWidget, ObjectWidget)
+        True
+        >>> IObjectWidget.extends(IEditWidget)
+        True
+    """
+
     _FieldFactory = Object
     def _WidgetFactory(self, context, request, **kw):
         kw.update({'factory': TestContact})


=== Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py 1.8.24.1 => 1.8.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py:1.8.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,13 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import PasswordWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
-
+from zope.interface.verify import verifyClass, verifyObject
 
 class PasswordWidgetTest(BrowserWidgetTest):
+    """
+    PasswordWidget implements IPasswordWidget, which is an edit widget type:
+        
+        >>> verifyClass(IPasswordWidget, PasswordWidget)
+        True
+        >>> IPasswordWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = PasswordWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_radiowidget.py 1.10.24.1 => 1.10.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_radiowidget.py:1.10.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_radiowidget.py	Sun Feb  8 02:02:28 2004
@@ -14,12 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import RadioWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
+from zope.interface.verify import verifyClass, verifyObject
 
 class RadioWidgetTest(BrowserWidgetTest):
+    """
+    RadioWidget implements IRadioWidget, which is an edit widget type:
+        
+        >>> verifyClass(IRadioWidget, RadioWidget)
+        True
+        >>> IRadioWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = RadioWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_sequencewidget.py 1.6 => 1.6.10.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_sequencewidget.py:1.6	Mon Jan  5 06:24:58 2004
+++ Zope3/src/zope/app/browser/form/tests/test_sequencewidget.py	Sun Feb  8 02:02:28 2004
@@ -15,7 +15,7 @@
 $Id$
 """
 
-import unittest
+import unittest, doctest
 
 from zope.app.tests import ztapi
 from zope.app.browser.form.widget import TextWidget
@@ -24,11 +24,20 @@
 from zope.schema import Tuple, List, TextLine
 from zope.app.browser.form.widget import TupleSequenceWidget, \
     ListSequenceWidget
-
+from zope.interface.verify import verifyClass, verifyObject
 
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
 
 class SequenceWidgetTest(BrowserWidgetTest):
+    """
+    SequenceWidget implements ISequenceWidget, which is an edit widget type:
+        
+        >>> verifyClass(ISequenceWidget, SequenceWidget)
+        True
+        >>> ISequenceWidget.extends(IEditWidget)
+        True
+    """
+
     def _FieldFactory(self, **kw):
         kw.update({'__name__': u'foo', 'value_type': TextLine(__name__=u'bar')})
         return Tuple(**kw)


=== Zope3/src/zope/app/browser/form/tests/test_textareawidget.py 1.9.24.1 => 1.9.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_textareawidget.py:1.9.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_textareawidget.py	Sun Feb  8 02:02:28 2004
@@ -14,13 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import TextAreaWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
-
+from zope.interface.verify import verifyClass, verifyObject
 
 class TextAreaWidgetTest(BrowserWidgetTest):
+    """
+    TextAreaWidget implements ITextAreaWidget, which is an edit widget type:
+        
+        >>> verifyClass(ITextAreaWidget, TextAreaWidget)
+        True
+        >>> ITextAreaWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = TextAreaWidget
 


=== Zope3/src/zope/app/browser/form/tests/test_textwidget.py 1.7.24.1 => 1.7.24.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_textwidget.py:1.7.24.1	Sat Feb  7 23:36:10 2004
+++ Zope3/src/zope/app/browser/form/tests/test_textwidget.py	Sun Feb  8 02:02:28 2004
@@ -14,13 +14,21 @@
 """
 $Id$
 """
-import unittest
+import unittest, doctest
 
 from zope.app.browser.form.widget import TextWidget
 from zope.app.browser.form.tests.test_browserwidget import BrowserWidgetTest
-
+from zope.interface.verify import verifyClass, verifyObject
 
 class TextWidgetTest(BrowserWidgetTest):
+    """
+    TextWidget implements ITextWidget, which is an edit widget type:
+        
+        >>> verifyClass(ITextWidget, TextWidget)
+        True
+        >>> ITextWidget.extends(IEditWidget)
+        True
+    """
 
     _WidgetFactory = TextWidget
 




More information about the Zope3-Checkins mailing list