[Zodb-checkins] CVS: Zope/lib/Components/ExtensionClass/test - regrtest.py:1.5 test_AqAlg.py:1.5 test_MultiMapping.py:1.4 test_Sync.py:1.6 test_ThreadLock.py:1.6 test_acquisition.py:1.6 test_add.py:1.3 test_binding.py:1.4 test_explicit_acquisition.py:1.4 test_method_hook.py:1.5

Martijn Pieters mj@zope.com
Wed, 14 Aug 2002 17:24:51 -0400


Update of /cvs-repository/Zope/lib/Components/ExtensionClass/test
In directory cvs.zope.org:/tmp/cvs-serv10880/test

Modified Files:
	regrtest.py test_AqAlg.py test_MultiMapping.py test_Sync.py 
	test_ThreadLock.py test_acquisition.py test_add.py 
	test_binding.py test_explicit_acquisition.py 
	test_method_hook.py 
Log Message:
Clean up indentation and trailing whitespace.


=== Zope/lib/Components/ExtensionClass/test/regrtest.py 1.4 => 1.5 ===
--- Zope/lib/Components/ExtensionClass/test/regrtest.py:1.4	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/regrtest.py	Wed Aug 14 17:24:48 2002
@@ -4,14 +4,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 os


=== Zope/lib/Components/ExtensionClass/test/test_AqAlg.py 1.4 => 1.5 ===
--- Zope/lib/Components/ExtensionClass/test/test_AqAlg.py:1.4	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_AqAlg.py	Wed Aug 14 17:24:48 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
-# 
+#
 ##############################################################################
 __doc__='''Examples from the Acquisition Algebra Presentation
 
@@ -99,4 +99,3 @@
 
 if __name__=='__main__':
     main()
-


=== Zope/lib/Components/ExtensionClass/test/test_MultiMapping.py 1.3 => 1.4 ===
--- Zope/lib/Components/ExtensionClass/test/test_MultiMapping.py:1.3	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_MultiMapping.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 from pprint import pprint
 from MultiMapping import *


=== Zope/lib/Components/ExtensionClass/test/test_Sync.py 1.5 => 1.6 ===
--- Zope/lib/Components/ExtensionClass/test/test_Sync.py:1.5	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_Sync.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 from Sync import Synchronized
 import thread
@@ -22,18 +22,18 @@
         self.count=0
 
     def inc(self):
-            c = self.count
-            if random() > 0.7:
-                sleep(1)
-            self.count = self.count + 1
-            return c, self.count
+        c = self.count
+        if random() > 0.7:
+            sleep(1)
+        self.count = self.count + 1
+        return c, self.count
 
     def incn(self,n):
-            c = self.count
-            for i in range(n):
-                self.inc()
-            return c, self.count
-        
+        c = self.count
+        for i in range(n):
+            self.inc()
+        return c, self.count
+
 p = P(1, 2, spam=3)
 
 def test():


=== Zope/lib/Components/ExtensionClass/test/test_ThreadLock.py 1.5 => 1.6 ===
--- Zope/lib/Components/ExtensionClass/test/test_ThreadLock.py:1.5	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_ThreadLock.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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 ThreadLock, thread
 from random import random
@@ -41,21 +41,21 @@
             self.__call_method__=lock.guarded_apply
 
     def inc(self):
-            c=self.count
-            if random() > 0.7:
-                sleep(1)
-            self.count=self.count+1
-            return c,self.count
+        c=self.count
+        if random() > 0.7:
+            sleep(1)
+        self.count=self.count+1
+        return c,self.count
 
     def incn(self,n):
-            c=self.count
-            for i in range(n): self.inc()
-            return c,self.count
-        
+        c=self.count
+        for i in range(n): self.inc()
+        return c,self.count
+
 p=P(1,2,spam=3)
 
 def test():
-    
+
     for i in range(8):
         n = 3
         old, new = p.incn(n)


=== Zope/lib/Components/ExtensionClass/test/test_acquisition.py 1.5 => 1.6 ===
--- Zope/lib/Components/ExtensionClass/test/test_acquisition.py:1.5	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_acquisition.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 from ExtensionClass import Base
 import Acquisition
@@ -51,11 +51,11 @@
     subob = self
     o = aq_base(o)
     while 1:
-      if aq_base(subob) is o: return 1
-      self = aq_inner(subob)
-      if self is None: break
-      subob = aq_parent(self)
-      if subob is None: break
+        if aq_base(subob) is o: return 1
+        self = aq_inner(subob)
+        if self is None: break
+        subob = aq_parent(self)
+        if subob is None: break
 
 
 assert checkContext(b.c, b)


=== Zope/lib/Components/ExtensionClass/test/test_add.py 1.2 => 1.3 ===
--- Zope/lib/Components/ExtensionClass/test/test_add.py:1.2	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_add.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 
 from ExtensionClass import *


=== Zope/lib/Components/ExtensionClass/test/test_binding.py 1.3 => 1.4 ===
--- Zope/lib/Components/ExtensionClass/test/test_binding.py:1.3	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_binding.py	Wed Aug 14 17:24:48 2002
@@ -2,29 +2,28 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 from ExtensionClass import Base
 from MethodObject import Method
 
 class foo(Method):
-  def __call__(self, ob, *args, **kw):
-    print 'called', ob, args, kw
+    def __call__(self, ob, *args, **kw):
+        print 'called', ob, args, kw
 
 class bar(Base):
-  def __repr__(self):
-    return "bar()"
-  hi = foo()
+    def __repr__(self):
+        return "bar()"
+    hi = foo()
 
 x=bar()
 hi=x.hi
 print type(hi)
 hi(1,2,3,name='spam')
-


=== Zope/lib/Components/ExtensionClass/test/test_explicit_acquisition.py 1.3 => 1.4 ===
--- Zope/lib/Components/ExtensionClass/test/test_explicit_acquisition.py:1.3	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_explicit_acquisition.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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
-# 
+#
 ##############################################################################
 from ExtensionClass import Base
 import Acquisition
@@ -30,4 +30,3 @@
     A().hi()
     raise 'Program error', 'spam'
 except AttributeError: pass
-


=== Zope/lib/Components/ExtensionClass/test/test_method_hook.py 1.4 => 1.5 ===
--- Zope/lib/Components/ExtensionClass/test/test_method_hook.py:1.4	Mon Jun 10 18:48:47 2002
+++ Zope/lib/Components/ExtensionClass/test/test_method_hook.py	Wed Aug 14 17:24:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 1996-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 ExtensionClass