[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - test_containertraversable.py:1.5 test_containertraverser.py:1.8 test_find.py:1.4 test_size.py:1.2 test_zopecontaineradpter.py:1.5
Steve Alexander
steve@cat-box.net
Sat, 7 Jun 2003 02:37:53 -0400
Update of /cvs-repository/Zope3/src/zope/app/container/tests
In directory cvs.zope.org:/tmp/cvs-serv4294/src/zope/app/container/tests
Modified Files:
test_containertraversable.py test_containertraverser.py
test_find.py test_size.py test_zopecontaineradpter.py
Log Message:
updated to use new-style interface declarations
=== Zope3/src/zope/app/container/tests/test_containertraversable.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/container/tests/test_containertraversable.py:1.4 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_containertraversable.py Sat Jun 7 02:37:22 2003
@@ -21,11 +21,12 @@
from zope.exceptions import NotFoundError
from zope.app.interfaces.container import IContainer
from zope.testing.cleanup import CleanUp
+from zope.interface import implements
class Container:
- __implements__ = IContainer
+ implements(IContainer)
def __init__(self, attrs={}, objs={}):
for attr,value in attrs.iteritems():
=== Zope3/src/zope/app/container/tests/test_containertraverser.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/container/tests/test_containertraverser.py:1.7 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_containertraverser.py Sat Jun 7 02:37:22 2003
@@ -21,7 +21,7 @@
from zope.component import getService
from zope.app.services.servicenames import Views
from zope.app.container.traversal import ContainerTraverser
-from zope.interface import Interface
+from zope.interface import Interface, implements
from zope.exceptions import NotFoundError
from zope.app.interfaces.container import IContainer
from zope.app.tests.placelesssetup import PlacelessSetup
@@ -31,7 +31,7 @@
class Container:
- __implements__ = IContainer
+ implements(IContainer)
def __init__(self, **kw):
for k in kw:
=== Zope3/src/zope/app/container/tests/test_find.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/container/tests/test_find.py:1.3 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_find.py Sat Jun 7 02:37:22 2003
@@ -20,11 +20,11 @@
from unittest import TestCase, main, makeSuite
from zope.app.interfaces.container import IReadContainer
from zope.app.interfaces.container.find import IObjectFindFilter
-from zope.app.container.find\
- import FindAdapter, SimpleIdFindFilter
+from zope.app.container.find import FindAdapter, SimpleIdFindFilter
+from zope.interface import implements
class FakeContainer:
- __implements__ = IReadContainer
+ implements(IReadContainer)
def __init__(self, id, objects):
self._id = id
@@ -62,7 +62,7 @@
return len(self._objects)
class TestObjectFindFilter(object):
- __implements__ = IObjectFindFilter
+ implements(IObjectFindFilter)
def __init__(self, count):
self._count = count
=== Zope3/src/zope/app/container/tests/test_size.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/container/tests/test_size.py:1.1 Fri Dec 27 13:22:58 2002
+++ Zope3/src/zope/app/container/tests/test_size.py Sat Jun 7 02:37:22 2003
@@ -15,10 +15,11 @@
from zope.app.interfaces.size import ISized
from zope.app.interfaces.container import IContainer
+from zope.interface import implements
class DummyContainer:
- __implements__ = IContainer
+ implements(IContainer)
def __init__(self, numitems):
self._numitems = numitems
=== Zope3/src/zope/app/container/tests/test_zopecontaineradpter.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/container/tests/test_zopecontaineradpter.py:1.4 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_zopecontaineradpter.py Sat Jun 7 02:37:22 2003
@@ -25,11 +25,12 @@
import BaseTestIZopeSimpleReadContainer, BaseTestIZopeReadContainer,\
BaseTestIZopeWriteContainer
from zope.app.tests.placelesssetup import PlacelessSetup
+from zope.interface import implements
class C: pass
class H:
- __implements__ = IAddNotifiable, IDeleteNotifiable
+ implements(IAddNotifiable, IDeleteNotifiable)
notified = 0
def beforeDeleteHook(self, object, container):
self.notified -= 1