[Zope3-checkins] CVS: Zope3/src/zope/configuration/tests - basetestdirectivesxml.py:1.1.2.3 directives.py:1.1.2.2 hooktestdummymodule.py:1.1.2.2 test_directivesxml.py:1.1.2.2 test_hookregistry.py:1.1.2.3 test_meta.py:1.1.2.3 test_metameta.py:1.1.2.3 test_metametafordocgen.py:1.1.2.3 test_multiplexml.py:1.1.2.3 test_names.py:1.1.2.3

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


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

Modified Files:
      Tag: NameGeddon-branch
	basetestdirectivesxml.py directives.py hooktestdummymodule.py 
	test_directivesxml.py test_hookregistry.py test_meta.py 
	test_metameta.py test_metametafordocgen.py test_multiplexml.py 
	test_names.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/configuration/tests/basetestdirectivesxml.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/basetestdirectivesxml.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/basetestdirectivesxml.py	Tue Dec 24 21:20:59 2002
@@ -58,7 +58,7 @@
             '''<test:doit name="splat" />'''
             ))
         self.assertEqual(done, ['splat'])
-        
+
     def testSimpleComplexDirective(self):
         xmlconfig(makeconfig(
             '''<directive
@@ -70,7 +70,7 @@
                    name=".Contact" permission="splat" names="update" />'''
             ))
         self.assertEquals(protections, [(".Contact", "splat", 'update')])
-        
+
     def testComplexDirective(self):
         xmlconfig(makeconfig(
             '''<directive
@@ -108,7 +108,7 @@
                  <test:subsub>
                    <test:subsub>
                      <test:subsub>
-                       <test:subsub> 
+                       <test:subsub>
                          <test:protect permission="beep" names="update" />
                        </test:subsub>
                      </test:subsub>
@@ -151,7 +151,7 @@
                  <protect permission="view" names='name email' />
                  </test:protectClass>
               '''))
-        
+
     def testBadPrefixComplexDirective(self):
         try: testxmlconfig(makeconfig(
             '''<directive


=== Zope3/src/zope/configuration/tests/directives.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/directives.py:1.1.2.1	Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/directives.py	Tue Dec 24 21:20:59 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 class for use by test modules
@@ -50,7 +50,7 @@
             return [(d, protections.append, (p,))]
         else:
             return ()
-            
+
     def protect(self, _context, permission=None, names=None):
         if permission is None: permission=self._permission
         if permission is None: raise 'no perm'


=== Zope3/src/zope/configuration/tests/hooktestdummymodule.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/hooktestdummymodule.py:1.1.2.1	Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/hooktestdummymodule.py	Tue Dec 24 21:20:59 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.
-# 
+#
 ##############################################################################
 """Hook test dummy module
 


=== Zope3/src/zope/configuration/tests/test_directivesxml.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_directivesxml.py:1.1.2.1	Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_directivesxml.py	Tue Dec 24 21:20:59 2002
@@ -2,21 +2,21 @@
 #
 # 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 sys, unittest
 from zope.configuration.tests.basetestdirectivesxml import directiveTests
 from zope.testing.cleanup import CleanUp
 
 class Test(CleanUp, unittest.TestCase, directiveTests): pass
-        
+
 def test_suite():
     loader=unittest.TestLoader()
     return loader.loadTestsFromTestCase(Test)


=== Zope3/src/zope/configuration/tests/test_hookregistry.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_hookregistry.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_hookregistry.py	Tue Dec 24 21:20:59 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.
-# 
+#
 ##############################################################################
 """
 
@@ -25,28 +25,28 @@
 
     def testAddHookable(self):
         from zope.configuration.hookregistry import HookRegistry
-        
+
         hookableAddr = (
             'zope.configuration.tests.hooktestdummymodule.dummyHookable')
-        
+
         hookRegistry=HookRegistry()
         hookRegistry.addHookable(hookableAddr)
         hookables=hookRegistry.getHookables()
         self.assertEquals(len(hookables), 1)
         self.assertEquals(hookables[0][0], hookableAddr)
         self.assertEquals(hookables[0][1],0)
-    
+
     def testAddDuplicateHookable(self):
         from zope.configuration.hookregistry import HookRegistry
         from zope.exceptions import DuplicationError
-        
+
         hookableAddr = (
-            'zope.configuration.tests.hooktestdummymodule.dummyHookable') 
+            'zope.configuration.tests.hooktestdummymodule.dummyHookable')
         hookRegistry=HookRegistry()
         hookRegistry.addHookable(hookableAddr)
         self.assertRaises(DuplicationError, hookRegistry.addHookable,
                           hookableAddr)
-        
+
     def testAddInvalidHookable(self):
         from zope.configuration.hookregistry import HookRegistry, \
              BadHookableError
@@ -58,7 +58,7 @@
         self.assertRaises(
             BadHookableError, hookRegistry.addHookable,
             'zope.configuration.hookregistry.hookregistry.addHookable')
-        
+
     def testAddHook(self):
         from zope.configuration.hookregistry import \
              HookRegistry, BadHookError, DuplicateHookError, \
@@ -74,7 +74,7 @@
         old = __import__(hookableParent, {}, {}, ('__dict__',)) # for cleanup
         old = getattr(old, hookableLast)
         self.assertEquals(old(), "original implementation")
-        
+
         hookRegistry = HookRegistry()
         hookRegistry.addHookable(hookableAddr)
         self.assertRaises(BadHookError, hookRegistry.addHook, hookableAddr,


=== Zope3/src/zope/configuration/tests/test_meta.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_meta.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_meta.py	Tue Dec 24 21:20:59 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 zope.configuration.tests.directives \
@@ -23,7 +23,7 @@
 
     def testImport(self):
         import zope.configuration.meta
-        
+
     def testDirective(self):
         from zope.configuration.meta \
              import register, registersub, begin, end, InvalidDirective
@@ -38,7 +38,7 @@
         callable(*args)
 
         self.failUnless(done==['splat'])
-        
+
     def testSimpleComplexDirective(self):
         from zope.configuration.meta \
              import register, registersub, begin, end, InvalidDirective
@@ -54,7 +54,7 @@
         callable(*args)
 
         self.assertEquals(protections, [(".Contact", "splat", 'update')])
-        
+
     def testComplexDirective(self):
         from zope.configuration.meta \
              import register, registersub, begin, sub, end, InvalidDirective


=== Zope3/src/zope/configuration/tests/test_metameta.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_metameta.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_metameta.py	Tue Dec 24 21:20:59 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 sys, unittest
 from zope.testing.cleanup import CleanUp
@@ -67,7 +67,7 @@
                    </directive>''',
                 '''<test:doit name="splat" />'''
                 ))
-        
+
 def test_suite():
     loader=unittest.TestLoader()
     return loader.loadTestsFromTestCase(Test)


=== Zope3/src/zope/configuration/tests/test_metametafordocgen.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_metametafordocgen.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_metametafordocgen.py	Tue Dec 24 21:20:59 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 sys, unittest
 from zope.testing.cleanup import CleanUp
@@ -87,7 +87,7 @@
                    </directive>''',
                 '''<test:doit name="splat" />'''
                 ))
-        
+
 def test_suite():
     loader=unittest.TestLoader()
     return loader.loadTestsFromTestCase(Test)


=== Zope3/src/zope/configuration/tests/test_multiplexml.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_multiplexml.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_multiplexml.py	Tue Dec 24 21:20:59 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, sys, os
 from tempfile import mktemp
@@ -32,7 +32,7 @@
 
 
 class Test(CleanUp, unittest.TestCase):
-        
+
     def testNormal(self):
         f2=tfile(template % ('',
             '''
@@ -41,7 +41,7 @@
             />
             <test:protectClass
             name=".Contact" permission="splat" names="update2"
-            />            
+            />
             '''), 'f2')
 
         f1=tfile(template % (
@@ -65,14 +65,14 @@
             ''' % f2), 'f1')
 
         XMLConfig(str(f1))()
-        
+
         self.assertEquals(protections, [
             (".Contact", "splat", 'update'),
             (".Contact", "splat", 'update2'),
             ])
 
         self.assertEquals(zope.configuration.tests.directives.count, 3)
-        
+
     def testConflicting(self):
         f2=tfile(template % ('',
             '''
@@ -81,13 +81,13 @@
             />
             <test:protectClass
             name=".Contact" permission="splat" names="update2"
-            />            
+            />
             '''), 'f2')
         f3=tfile(template % ('',
             '''
             <test:protectClass
             name=".Contact" permission="splat" names="update2"
-            />            
+            />
             '''), 'f3')
 
         f1=tfile(template % (
@@ -108,10 +108,10 @@
         from zope.configuration.xmlconfig import ZopeConfigurationConflictError
 
         self.assertRaises(ZopeConfigurationConflictError, x)
-        
+
         self.assertEquals(protections, [])
-        
-        
+
+
     def testConflicting_in_same_location(self):
         f1=tfile(template % (
             '''<directive name="protectClass" namespace="%s"
@@ -132,13 +132,13 @@
         from zope.configuration.xmlconfig import ZopeConfigurationConflictError
 
         self.assertRaises(ZopeConfigurationConflictError, x)
-        
+
         self.assertEquals(protections, [])
-        
+
 
 
 class tfile:
-    
+
     def __init__(self, string, suffix):
         self.name = mktemp(suffix)
         file = open(self.name, 'w')


=== Zope3/src/zope/configuration/tests/test_names.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/configuration/tests/test_names.py:1.1.2.2	Mon Dec 23 16:05:13 2002
+++ Zope3/src/zope/configuration/tests/test_names.py	Tue Dec 24 21:20:59 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.
-# 
+#
 ##############################################################################
 """
 
@@ -32,7 +32,7 @@
             del sys.modules['zopeproducts']
         else:
             sys.modules['zopeproducts']=self.old
-        
+
     def testProductPath(self):
         from zope.configuration.name import resolve
 
@@ -40,7 +40,7 @@
         self.assertEquals(c.n, 2)
         c=resolve('zopeproducts.contact.contact.Contact')
         self.assertEquals(c.n, 2)
-        
+
     def testPackagePath(self):
         from zope.configuration.name import resolve
 
@@ -52,14 +52,14 @@
         self.assertEquals(c.n, 1)
         c=resolve('zope.configuration.tests.contact.contact.Contact')
         self.assertEquals(c.n, 1)
-        
+
     def testNoDots(self):
         from zope.configuration.name import resolve
         import zope
         c=resolve('zope')
 
         self.assertEquals(id(c), id(zope))
-        
+
     def testPackage(self):
         from zope.configuration.name import resolve
         c=resolve('zope.configuration.tests')
@@ -97,7 +97,7 @@
         ('.tests.','zope.configuration'):
         'zope.configuration.tests+'
         }
-    
+
     def testNormalizedName(self):
         from zope.configuration.name import getNormalizedName
         for args in self.nameSet: