[Zope3-checkins] CVS: Zope3/src/zope/app/contentdirective/tests - exampleclass.py:1.1.2.2 modulehookup.py:1.1.2.2 test_directives.py:1.1.2.4 test_factory.py:1.1.2.4 test_requirepermissions.py:1.1.2.3

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


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

Modified Files:
      Tag: NameGeddon-branch
	exampleclass.py modulehookup.py test_directives.py 
	test_factory.py test_requirepermissions.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/contentdirective/tests/exampleclass.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/contentdirective/tests/exampleclass.py:1.1.2.1	Mon Dec 23 14:31:32 2002
+++ Zope3/src/zope/app/contentdirective/tests/exampleclass.py	Tue Dec 24 21:20:25 2002
@@ -2,7 +2,7 @@
 
 class ExampleClass:
     pass
-    
+
 class IExample(Interface):
     pass
 


=== Zope3/src/zope/app/contentdirective/tests/modulehookup.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/contentdirective/tests/modulehookup.py:1.1.2.1	Mon Dec 23 18:49:19 2002
+++ Zope3/src/zope/app/contentdirective/tests/modulehookup.py	Tue Dec 24 21:20:25 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.
-# 
+#
 ##############################################################################
 """Preliminaries to hookup a test suite with the external TestModule.
 
@@ -33,12 +33,12 @@
 class I2(I):
     def m4():
         pass
-    
+
 
 class S(Interface):
     foo = Text()
     bar = Text()
-    
+
 
 module.I = I
 module.I2 = I2


=== Zope3/src/zope/app/contentdirective/tests/test_directives.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/contentdirective/tests/test_directives.py:1.1.2.3	Tue Dec 24 07:51:02 2002
+++ Zope3/src/zope/app/contentdirective/tests/test_directives.py	Tue Dec 24 21:20:25 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.
-# 
+#
 ##############################################################################
 """
 
@@ -49,12 +49,12 @@
         XMLConfig('metameta.zcml', zope.configuration)()
         XMLConfig('meta.zcml', zope.app.contentdirective)()
         XMLConfig('meta.zcml', zope.app.security)()
-        
+
         try:
             del ExampleClass.__implements__
         except AttributeError:
             pass
-            
+
     def testEmptyDirective(self):
         f = configfile("""
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
@@ -62,7 +62,7 @@
                        """)
         xmlconfig(f)
 
-            
+
     def testImplements(self):
         f = configfile("""
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
@@ -71,8 +71,8 @@
                        """)
         xmlconfig(f)
         self.failUnless(IExample.isImplementedByInstancesOf(ExampleClass))
-        
-        
+
+
     def testRequire(self):
         f = configfile("""
 <permission id="zope.View" title="Zope view permission" />
@@ -90,7 +90,7 @@
 </content>
                        """)
         xmlconfig(f)
-        
+
     def testMimic(self):
         f = configfile("""
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
@@ -98,7 +98,7 @@
 </content>
                        """)
         xmlconfig(f)
-        
+
 
 class TestFactorySubdirective(PlacelessSetup, unittest.TestCase):
     def setUp(self):
@@ -113,8 +113,8 @@
 <permission id="zope.Foo" title="Zope Foo Permission" />
 
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
-    <factory 
-      id="Example" 
+    <factory
+      id="Example"
       permission="zope.Foo"
       title="Example content"
       description="Example description"
@@ -125,13 +125,13 @@
 
 
     def testFactoryUndefinedPermission(self):
-         
+
         f = configfile("""
 <permission id="zope.Foo" title="Zope Foo Permission" />
 
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
-    <factory 
-      id="Example" 
+    <factory
+      id="Example"
       permission="UndefinedPermission"
       title="Example content"
       description="Example description"


=== Zope3/src/zope/app/contentdirective/tests/test_factory.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/contentdirective/tests/test_factory.py:1.1.2.3	Tue Dec 24 07:51:02 2002
+++ Zope3/src/zope/app/contentdirective/tests/test_factory.py	Tue Dec 24 21:20:25 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.
-# 
+#
 ##############################################################################
 """ Test handler for 'factory' subdirective of 'content' directive """
 
@@ -53,8 +53,8 @@
         f = configfile("""
 <permission id="zope.Foo" title="Zope Foo Permission" />
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
-    <factory 
-      id="Example" 
+    <factory
+      id="Example"
       permission="zope.Foo"
       title="Example content"
       description="Example description"
@@ -72,7 +72,7 @@
         f = configfile("""
 <permission id="zope.Foo" title="Zope Foo Permission" />
 <content class="zope.app.contentdirective.tests.exampleclass.ExampleClass">
-    <factory 
+    <factory
       permission="zope.Foo"
       title="Example content"
       description="Example description"
@@ -92,6 +92,3 @@
 
 if __name__=='__main__':
     unittest.TextTestRunner().run(test_suite())
-
-
-


=== Zope3/src/zope/app/contentdirective/tests/test_requirepermissions.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/contentdirective/tests/test_requirepermissions.py:1.1.2.2	Mon Dec 23 18:49:19 2002
+++ Zope3/src/zope/app/contentdirective/tests/test_requirepermissions.py	Tue Dec 24 21:20:25 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.
-# 
+#
 ##############################################################################
 """ Test handler for 'require' subdirective of 'content' directive """
 
@@ -92,7 +92,7 @@
     def testSimpleMethodsPlural(self):
         declaration = ("""<content class="%s">
                             <require
-                                permission="%s" 
+                                permission="%s"
                                 attributes="m1 m3"/>
                           </content>"""
                        % (PREFIX+"test_class", P1))
@@ -115,7 +115,7 @@
     def test_set_attributes(self):
         declaration = ("""<content class="%s">
                             <require
-                                permission="%s" 
+                                permission="%s"
                                 set_attributes="m1 m3"/>
                           </content>"""
                        % (PREFIX+"test_class", P1))
@@ -128,7 +128,7 @@
     def test_set_schema(self):
         declaration = ("""<content class="%s">
                             <require
-                                permission="%s" 
+                                permission="%s"
                                 set_schema="%s"/>
                           </content>"""
                        % (PREFIX+"test_class", P1, PREFIX+"S"))
@@ -143,7 +143,7 @@
     def testSimpleInterface(self):
         declaration = ("""<content class="%s">
                             <require
-                                permission="%s" 
+                                permission="%s"
                                 interface="%s"/>
                           </content>"""
                        % (PREFIX+"test_class", P1, PREFIX+"I"))
@@ -213,7 +213,7 @@
         # m1 and m2 are in the interface, so should be set, and m3 should not:
         self.assertDeclaration(declaration,
                                m1P=P1, m2P=P1)
-        
+
 
     def testMimicAsDefault(self):
         declaration = ("""<content class="%s">