[Zope3-checkins] CVS: Zope3/src/zope/app/content/tests - test_dtmlpage.py:1.1.2.2 test_folder.py:1.1.2.2 test_image.py:1.1.2.2 test_zptpage.py:1.1.2.2 testdt_sqlgroup.py:1.1.2.2 testdt_sqltest.py:1.1.2.3 testdt_sqlvar.py:1.1.2.2

Tim Peters tim.one@comcast.net
Tue, 24 Dec 2002 21:21:25 -0500


Update of /cvs-repository/Zope3/src/zope/app/content/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/content/tests

Modified Files:
      Tag: NameGeddon-branch
	test_dtmlpage.py test_folder.py test_image.py test_zptpage.py 
	testdt_sqlgroup.py testdt_sqltest.py testdt_sqlvar.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/content/tests/test_dtmlpage.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/test_dtmlpage.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/test_dtmlpage.py	Tue Dec 24 21:20:24 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.
-# 
+#
 ##############################################################################
 """
 Basic tests for Page Templates used in content-space.
@@ -39,8 +39,8 @@
 
     def __getitem__(self, name):
         return getattr(self, name)
-    
-    
+
+
 class DTMLPageTests(PlacelessSetup, unittest.TestCase):
 
     def setUp(self):
@@ -65,7 +65,7 @@
         out = page.render(Data(URL={'1': 'http://foo.com/'}),
                           title="Zope rules")
         out = ' '.join(out.split())
-        
+
 
         self.assertEqual(
             out,
@@ -76,7 +76,7 @@
             )
 
 def test_suite():
-   return unittest.makeSuite(DTMLPageTests)
+    return unittest.makeSuite(DTMLPageTests)
 
 if __name__=='__main__':
-   unittest.TextTestRunner().run(test_suite())
+    unittest.TextTestRunner().run(test_suite())


=== Zope3/src/zope/app/content/tests/test_folder.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/test_folder.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/test_folder.py	Tue Dec 24 21:20:24 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.
-# 
+#
 ##############################################################################
 import unittest
 from unittest import TestCase


=== Zope3/src/zope/app/content/tests/test_image.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/test_image.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/test_image.py	Tue Dec 24 21:20:24 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.
-# 
+#
 ##############################################################################
 """
 
@@ -24,7 +24,7 @@
     def _makeImage(self, *args, **kw):
         from zope.app.content.image import Image
         return Image(*args, **kw)
-        
+
 
     def testEmpty(self):
         file = self._makeImage()
@@ -35,14 +35,14 @@
         file = self._makeImage('Data')
         self.assertEqual(file.getContentType(), '')
         self.assertEqual(file.getData(), 'Data')
-        
+
     def testMutators(self):
         # XXX What's the point of this test? Does it test that data
         # contents override content-type? Or not? If the former, then
         # real image data should be used.
 
         file = self._makeImage()
-        
+
         file.setContentType('text/plain')
         self.assertEqual(file.getContentType(), 'text/plain')
 
@@ -57,7 +57,7 @@
         from zope.app.content.image import Image, IImage
 
         self.failUnless(IImage.isImplementedByInstancesOf(Image))
-        self.failUnless(verifyClass(IImage, Image))        
+        self.failUnless(verifyClass(IImage, Image))
 
 def test_suite():
     return unittest.makeSuite(Test)


=== Zope3/src/zope/app/content/tests/test_zptpage.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/test_zptpage.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/test_zptpage.py	Tue Dec 24 21:20:24 2002
@@ -52,20 +52,20 @@
     def testSearchableText(self):
         page = ZPTPage()
         searchableText = getAdapter(page, ISearchableText)
-        
+
         utext = u'another test\n' # The source will grow a newline if ommited
         html = u"<html><body>%s</body></html>\n" % (utext, )
-        
+
         page.setSource(utext)
         self.failUnlessEqual(searchableText.getSearchableText(), [utext])
 
         page.setSource(html, content_type='text/html')
         self.assertEqual(searchableText.getSearchableText(), [utext+'\n'])
-        
+
         page.setSource(html, content_type='text/plain')
         self.assertEqual(searchableText.getSearchableText(), [html])
 
-       
+
 
     def testZPTRendering(self):
         page = ZPTPage()
@@ -96,7 +96,7 @@
 
 
 def test_suite():
-   return unittest.makeSuite(ZPTPageTests)
+    return unittest.makeSuite(ZPTPageTests)
 
 if __name__=='__main__':
-   unittest.TextTestRunner().run(test_suite())
+    unittest.TextTestRunner().run(test_suite())


=== Zope3/src/zope/app/content/tests/testdt_sqlgroup.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/testdt_sqlgroup.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/testdt_sqlgroup.py	Tue Dec 24 21:20:24 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 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
-# 
+#
 ##############################################################################
 """DT_SQLVar Tests
 
@@ -16,7 +16,7 @@
 """
 
 import unittest
-from zope.app.content.sql import SQLDTML 
+from zope.app.content.sql import SQLDTML
 
 
 class TestDT_SQLGroup(unittest.TestCase):


=== Zope3/src/zope/app/content/tests/testdt_sqltest.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/content/tests/testdt_sqltest.py:1.1.2.2	Tue Dec 24 07:51:00 2002
+++ Zope3/src/zope/app/content/tests/testdt_sqltest.py	Tue Dec 24 21:20:24 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 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
-# 
+#
 ##############################################################################
 """DT_SQLVar Tests
 
@@ -34,7 +34,7 @@
     def testIntType(self):
         html = self.doc_class("<dtml-sqltest column type=int>")
         result = "column = 3"
-    
+
         self.assertEqual(html(column=3), result)
         self.assertEqual(html(column='3'), result)
         self.assertEqual(html(column=3.1), result)
@@ -43,7 +43,7 @@
     def testFloatType(self):
         html = self.doc_class("<dtml-sqltest column type=float>")
         result = "column = 3.1"
-    
+
         self.assertEqual(html(column=3), "column = 3.0")
         self.assertEqual(html(column='3'), "column = 3")
         self.assertEqual(html(column='3.1'), result)
@@ -52,7 +52,7 @@
 
     def testStringTypeAndEscaping(self):
         html = self.doc_class("<dtml-sqltest column type=nb>")
-    
+
         self.assertEqual(html(column='name'), "column = 'name'")
         self.assertEqual(html(column='Let\'s do it'),
                          "column = 'Let''s do it'")
@@ -70,35 +70,35 @@
 
 
     def testCustomColumnName(self):
-            html = self.doc_class(
-                "<dtml-sqltest col column=col type=nb optional>")
-            result1 = "col = 'name'"
-            result2 = ""
-
-            self.assertEqual(html(col='name'), result1)
-            self.assertEqual(html(col=''), result2)
-            self.assertEqual(html(), result2)
+        html = self.doc_class(
+            "<dtml-sqltest col column=col type=nb optional>")
+        result1 = "col = 'name'"
+        result2 = ""
+
+        self.assertEqual(html(col='name'), result1)
+        self.assertEqual(html(col=''), result2)
+        self.assertEqual(html(), result2)
 
 
     def testOptional(self):
-            html = self.doc_class("<dtml-sqltest column type=nb optional>")
-            result1 = "column = 'name'"
-            result2 = ""
-
-            self.assertEqual(html(column='name'), result1)
-            self.assertEqual(html(column=''), result2)
-            self.assertEqual(html(), result2)
+        html = self.doc_class("<dtml-sqltest column type=nb optional>")
+        result1 = "column = 'name'"
+        result2 = ""
+
+        self.assertEqual(html(column='name'), result1)
+        self.assertEqual(html(column=''), result2)
+        self.assertEqual(html(), result2)
 
 
     def testMultiple(self):
-            html = self.doc_class(
-                "<dtml-sqltest column type=nb optional multiple>")
-            result1 = "column in ('name1', 'name2')"
-            result2 = ""
-
-            self.assertEqual(html(column=('name1', 'name2')), result1)
-            self.assertEqual(html(column=()), result2)
-            self.assertEqual(html(), result2)
+        html = self.doc_class(
+            "<dtml-sqltest column type=nb optional multiple>")
+        result1 = "column in ('name1', 'name2')"
+        result2 = ""
+
+        self.assertEqual(html(column=('name1', 'name2')), result1)
+        self.assertEqual(html(column=()), result2)
+        self.assertEqual(html(), result2)
 
 
 def test_suite():


=== Zope3/src/zope/app/content/tests/testdt_sqlvar.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content/tests/testdt_sqlvar.py:1.1.2.1	Mon Dec 23 14:31:30 2002
+++ Zope3/src/zope/app/content/tests/testdt_sqlvar.py	Tue Dec 24 21:20:24 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 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
-# 
+#
 ##############################################################################
 """DT_SQLVar Tests
 
@@ -16,7 +16,7 @@
 """
 
 import unittest
-from zope.app.content.sql import SQLDTML 
+from zope.app.content.sql import SQLDTML
 
 
 class TestDT_SQLVar(unittest.TestCase):
@@ -27,14 +27,14 @@
     def testSimpleUse(self):
         html = self.doc_class("<dtml-sqlvar column type=nb>")
         result = "'name'"
-    
+
         self.assertEqual(html(column='name'), result)
-       
+
 
     def testIntType(self):
         html = self.doc_class("<dtml-sqlvar column type=int>")
         result = "3"
-    
+
         self.assertEqual(html(column=3), result)
         self.assertEqual(html(column='3'), result)
         self.assertEqual(html(column=3.1), result)
@@ -43,7 +43,7 @@
     def testFloatType(self):
         html = self.doc_class("<dtml-sqlvar column type=float>")
         result = "3.1"
-    
+
         self.assertEqual(html(column=3), "3.0")
         self.assertEqual(html(column='3'), "3")
         self.assertEqual(html(column='3.1'), result)
@@ -52,7 +52,7 @@
 
     def testStringTypeAndEscaping(self):
         html = self.doc_class("<dtml-sqlvar column type=nb>")
-    
+
         self.assertEqual(html(column='name'), "'name'")
         self.assertEqual(html(column='Let\'s do it'), "'Let''s do it'")
         # Acid test :)
@@ -62,11 +62,11 @@
     def testOptional(self):
         html = self.doc_class("""<dtml-sqlvar column type=nb optional>""")
         result = "null"
-    
+
         self.assertEqual(html(column=None), result)
         self.assertEqual(html(column=''), result)
         self.assertEqual(html(), result)
-    
+
 
 
 def test_suite():