[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests - test_add.py:1.1.2.3 test_browserwidget.py:1.1.2.2 test_editview.py:1.1.2.2 test_filewidget.py:1.1.2.2 test_listwidget.py:1.1.2.2 test_multilistwidget.py:1.1.2.2 test_setprefix.py:1.1.2.2 test_textwidget.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:46 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/browser/form/tests
Modified Files:
Tag: NameGeddon-branch
test_add.py test_browserwidget.py test_editview.py
test_filewidget.py test_listwidget.py test_multilistwidget.py
test_setprefix.py test_textwidget.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/app/browser/form/tests/test_add.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/browser/form/tests/test_add.py:1.1.2.2 Tue Dec 24 07:50:50 2002
+++ Zope3/src/zope/app/browser/form/tests/test_add.py Tue Dec 24 21:20:14 2002
@@ -33,7 +33,7 @@
return globals()[name]
class I(Interface):
-
+
name = TextLine()
first = TextLine()
last = TextLine()
@@ -59,7 +59,7 @@
extra1 = CustomWidget(Text)
extra2 = CustomWidget(Text)
-
+
class SampleData:
name = "foo"
@@ -143,13 +143,13 @@
self.assertEqual(" ".join(fields),
"name first last email address foo extra1 extra2")
self.assertEqual(content_factory, C)
- self.assertEqual(" ".join(arguments),
+ self.assertEqual(" ".join(arguments),
"first last")
- self.assertEqual(" ".join(keyword_arguments),
+ self.assertEqual(" ".join(keyword_arguments),
"email")
- self.assertEqual(" ".join(set_before_add),
+ self.assertEqual(" ".join(set_before_add),
"foo")
- self.assertEqual(" ".join(set_after_add),
+ self.assertEqual(" ".join(set_after_add),
"extra1 name address extra2")
self.failIf(kw)
@@ -163,7 +163,7 @@
def __init__(self, test):
self.test = test
-
+
def add(self, ob):
self.ob = ob
self.test.assertEqual(
@@ -175,7 +175,7 @@
return ob
def nextURL(self):
return "."
-
+
adding = Adding(self)
args = self.test_add()
factory = AddViewFactory(*args)
=== Zope3/src/zope/app/browser/form/tests/test_browserwidget.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_browserwidget.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_browserwidget.py Tue Dec 24 21:20:14 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
@@ -100,7 +100,7 @@
self.assertEqual(w._showData(), 'val')
w.setData('Xfoo')
- self.assertEqual(w._showData(), 'foo')
+ self.assertEqual(w._showData(), 'foo')
def test_haveData(self):
self.failUnless(self._widget.haveData())
@@ -114,7 +114,7 @@
request = TestRequest()
widget = self._WidgetFactory(field, request)
self.assertEqual(widget._showData(), u'def')
-
+
def test_suite():
return unittest.makeSuite(Test)
=== Zope3/src/zope/app/browser/form/tests/test_editview.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_editview.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_editview.py Tue Dec 24 21:20:14 2002
@@ -88,7 +88,7 @@
self.assertEqual(c.bar, u'd bar')
self.assertEqual(c.a , u'c a')
self.assertEqual(c.b , u'c b')
- self.assertEqual(c.baz, u'd baz')
+ self.assertEqual(c.baz, u'd baz')
self.failUnless(getEvents(filter=lambda event: event.object == c))
def test_update_no_update(self):
=== Zope3/src/zope/app/browser/form/tests/test_filewidget.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_filewidget.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_filewidget.py Tue Dec 24 21:20:14 2002
@@ -24,7 +24,7 @@
_WidgetFactory = FileWidget
- def setUp(self):
+ def setUp(self):
BrowserWidgetTest.setUp(self)
file = StringIO('Foo Value')
=== Zope3/src/zope/app/browser/form/tests/test_listwidget.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_listwidget.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_listwidget.py Tue Dec 24 21:20:14 2002
@@ -54,7 +54,7 @@
def testRender(self):
value = 'foo'
- check_list = ('select', 'name="field.foo"', 'size="5"',
+ check_list = ('select', 'name="field.foo"', 'size="5"',
'option', 'value="foo"', '>foo<',
'value="foo"', '>bar<', 'selected="selected"')
self._verifyResult(self._widget.render(value), check_list)
=== Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py Tue Dec 24 21:20:14 2002
@@ -53,7 +53,7 @@
def testRender(self):
value = 'foo'
- check_list = ('select', 'name="field.foo"', 'size="5"',
+ check_list = ('select', 'name="field.foo"', 'size="5"',
'option', 'value="foo"', '>foo<',
'value="foo"', '>bar<', 'selected="selected"',
'multiple="multiple"')
=== Zope3/src/zope/app/browser/form/tests/test_setprefix.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_setprefix.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_setprefix.py Tue Dec 24 21:20:14 2002
@@ -22,7 +22,7 @@
class Test(TestCase):
-
+
def setUp(self):
field = Text(__name__ = 'foo')
request = TestRequest()
=== Zope3/src/zope/app/browser/form/tests/test_textwidget.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/browser/form/tests/test_textwidget.py:1.1.2.1 Mon Dec 23 14:31:08 2002
+++ Zope3/src/zope/app/browser/form/tests/test_textwidget.py Tue Dec 24 21:20:14 2002
@@ -23,7 +23,7 @@
class TextWidgetTest(BrowserWidgetTest):
_WidgetFactory = TextWidget
-
+
def testProperties(self):
self.assertEqual(self._widget.getValue('tag'), 'input')
self.assertEqual(self._widget.getValue('type'), 'text')