[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/form/tests/test_widget.py
Cosmetic changes in test_widget.py.
Gintautas Miliauskas
cvs-admin at zope.org
Fri Jun 18 05:57:14 EDT 2004
Log message for revision 25896:
Cosmetic changes in test_widget.py.
-=-
Modified: Zope3/trunk/src/zope/app/form/tests/test_widget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/tests/test_widget.py 2004-06-17 20:44:09 UTC (rev 25895)
+++ Zope3/trunk/src/zope/app/form/tests/test_widget.py 2004-06-18 09:54:05 UTC (rev 25896)
@@ -90,11 +90,11 @@
>>> from zope.app.form import InputWidget
>>> from zope.app.form.interfaces import WidgetInputError
>>> class TestInputWidget(InputWidget):
- ... def getInputValue(self):
- ... if self.context.required:
- ... raise WidgetInputError('', '', None)
- ... else:
- ... return 'Foo Bar'
+ ... def getInputValue(self):
+ ... if self.context.required:
+ ... raise WidgetInputError('', '', None)
+ ... else:
+ ... return 'Foo Bar'
All widgets rely on a field and a request:
@@ -103,7 +103,7 @@
>>> field = Field()
>>> from zope.interface import Interface
>>> class ITestRequest(Interface):
- ... pass
+ ... pass
>>> widget = TestInputWidget(field, Request(ITestRequest))
The default implementation of hasValidInput and validate both rely on
@@ -115,7 +115,7 @@
>>> widget.getInputValue()
Traceback (most recent call last):
WidgetInputError: ('', '', None)
-
+
A call to validate, however, accomplishes the same thing with improved
readability:
@@ -135,7 +135,7 @@
>>> widget.getInputValue()
'Foo Bar'
- Corredpondingly, validate does not raise an error:
+ Correspondingly, validate does not raise an error:
>>> widget.validate()
More information about the Zope3-Checkins
mailing list