[Zope3-checkins] CVS: Zope3/src/zope/interface/tests - dummy.py:1.1.2.2 iadapter.py:1.1.2.2 ifoo.py:1.1.2.2 iimplementor.py:1.1.2.2 test_document.py:1.1.2.3 test_implements.py:1.1.2.3 test_interface.py:1.1.2.3 test_type.py:1.1.2.2 test_verify.py:1.1.2.3 test_visitimplements.py:1.1.2.3 unitfixtures.py:1.1.2.3
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:41 -0500
Update of /cvs-repository/Zope3/src/zope/interface/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/interface/tests
Modified Files:
Tag: NameGeddon-branch
dummy.py iadapter.py ifoo.py iimplementor.py test_document.py
test_implements.py test_interface.py test_type.py
test_verify.py test_visitimplements.py unitfixtures.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/interface/tests/dummy.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/interface/tests/dummy.py:1.1.2.1 Mon Dec 23 14:32:57 2002
+++ Zope3/src/zope/interface/tests/dummy.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
from zope.interface.tests.ifoo import IFoo
=== Zope3/src/zope/interface/tests/iadapter.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/interface/tests/iadapter.py:1.1.2.1 Mon Dec 23 17:25:57 2002
+++ Zope3/src/zope/interface/tests/iadapter.py Tue Dec 24 21:21:09 2002
@@ -41,12 +41,12 @@
def testImplementsIAdapterRegistry(self):
from zope.interface.verify import verifyObject
from zope.interface.interfaces import IAdapterRegistry
-
+
registry = self._new()
verifyObject(IAdapterRegistry, registry)
- def __registery(self):
+ def __registery(self):
registry = self._new()
registry.register(None, P3, 'default P3')
@@ -62,7 +62,7 @@
def testBadProvide(self):
registry = self._new()
self.assertRaises(TypeError, registry.register, R2, None, '')
-
+
def test_get(self):
registry = self.__registery()
@@ -142,19 +142,19 @@
def test_getRegistered(self):
registry = self.__registery()
-
+
# Get something that was registered directly
self.assertEqual(registry.getRegistered(R2, P3), 'R2 P3')
self.assertEqual(registry.getRegistered(Interface, P3), 'any P3')
self.assertEqual(registry.getRegistered(None, P3), 'default P3')
-
+
# this mustn't return anything that was not registered directly
self.assertEqual(registry.getRegistered(R3, P3), None)
self.assertEqual(registry.getRegistered(R2, P2), None)
def test_getRegisteredMatching_all(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching())
got.sort()
expect = [
@@ -167,7 +167,7 @@
def test_getRegisteredMatching_required_R1(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
required_interfaces = (R1, )
))
@@ -181,7 +181,7 @@
def test_getRegisteredMatching_required_multiple(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
required_interfaces = (R12, R2)
))
@@ -196,7 +196,7 @@
def test_getRegisteredMatching_provided_P1(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
provided_interfaces = (P1, )
))
@@ -211,7 +211,7 @@
def test_getRegisteredMatching_provided_P2(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
provided_interfaces = (P3, )
))
@@ -226,7 +226,7 @@
def test_getRegisteredMatching_required_and_provided_1(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
required_interfaces = (R4, R12),
provided_interfaces = (P1, ),
@@ -242,7 +242,7 @@
def test_getRegisteredMatching_required_and_provided_2(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
required_interfaces = (R4, R12),
provided_interfaces = (P3, ),
@@ -255,11 +255,11 @@
]
expect.sort()
self.assertEqual(got, expect)
-
+
def test_getRegisteredMatching_required_and_provided_exact(self):
registry = self.__registery()
-
+
got = list(registry.getRegisteredMatching(
required_interfaces = (R2, ),
provided_interfaces = (P3, ),
@@ -272,7 +272,3 @@
]
expect.sort()
self.assertEqual(got, expect)
-
-
-
-
=== Zope3/src/zope/interface/tests/ifoo.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/interface/tests/ifoo.py:1.1.2.1 Mon Dec 23 14:32:57 2002
+++ Zope3/src/zope/interface/tests/ifoo.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
from zope.interface import Interface
=== Zope3/src/zope/interface/tests/iimplementor.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/interface/tests/iimplementor.py:1.1.2.1 Mon Dec 23 17:25:57 2002
+++ Zope3/src/zope/interface/tests/iimplementor.py Tue Dec 24 21:21:09 2002
@@ -41,11 +41,11 @@
from zope.interface.verify import verifyObject
from zope.interface.interfaces \
import IImplementorRegistry
-
+
registry = self._new()
verifyObject(IImplementorRegistry, registry)
- def __registry(self):
+ def __registry(self):
registry = self._new()
registry.register(P3, 'C3')
return registry
@@ -60,7 +60,7 @@
registry.register(P1, 'C1')
registry.register(P2, 'C3')
-
+
def testBadProvide(self):
registry = self.__registry()
self.assertRaises(TypeError, registry.register, None, '')
=== Zope3/src/zope/interface/tests/test_document.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/test_document.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/test_document.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
"""
@@ -50,7 +50,7 @@
f23() -- f23 doc
''')
-
+
def test_suite():
return makeSuite(Test)
@@ -64,7 +64,7 @@
a1 = Attribute('a1')
a2 = Attribute('a2', 'a2 doc')
-
+
def f21(): "f21 doc"
def f22(): pass
def f23(): "f23 doc"
=== Zope3/src/zope/interface/tests/test_implements.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/test_implements.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/test_implements.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
from zope.interface import Interface
=== Zope3/src/zope/interface/tests/test_interface.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/test_interface.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/test_interface.py Tue Dec 24 21:21:09 2002
@@ -166,4 +166,3 @@
if __name__=="__main__":
main()
-
=== Zope3/src/zope/interface/tests/test_type.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/interface/tests/test_type.py:1.1.2.1 Mon Dec 23 14:32:57 2002
+++ Zope3/src/zope/interface/tests/test_type.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
"""
=== Zope3/src/zope/interface/tests/test_verify.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/test_verify.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/test_verify.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
"""
@@ -44,7 +44,7 @@
class I(Interface):
def f(): pass
- class C:
+ class C:
__implements__=I
@@ -63,7 +63,7 @@
class I(II):
pass
- class C:
+ class C:
__implements__=I
@@ -80,7 +80,7 @@
class C:
- def f(self, b): pass
+ def f(self, b): pass
__implements__=I
@@ -114,7 +114,7 @@
class C:
- def f(self, a, b): pass
+ def f(self, a, b): pass
__implements__=I
@@ -135,7 +135,7 @@
class C:
- def f(self, a): pass
+ def f(self, a): pass
__implements__=I
@@ -152,7 +152,7 @@
class C:
- def f(self, a): pass
+ def f(self, a): pass
__implements__=I
@@ -168,7 +168,7 @@
from zope.interface.tests import dummy
verifyObject(IFoo, dummy)
-
+
def test_suite():
=== Zope3/src/zope/interface/tests/test_visitimplements.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/test_visitimplements.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/test_visitimplements.py Tue Dec 24 21:21:09 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
@@ -32,7 +32,7 @@
data=[]
self.assertRaises(BadImplements,
visitImplements, unittest, None, data.append)
-
+
def testComplexImplements(self):
data=[]
visitImplements((I1, (I2, I3)), None, data.append)
=== Zope3/src/zope/interface/tests/unitfixtures.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/interface/tests/unitfixtures.py:1.1.2.2 Mon Dec 23 14:42:58 2002
+++ Zope3/src/zope/interface/tests/unitfixtures.py Tue Dec 24 21:21:09 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.
-#
+#
##############################################################################
from zope.interface import Interface
from zope.interface.interface import Attribute
@@ -38,7 +38,7 @@
def m2(a, b):
"return 2"
-
+
C.__implements__=IC