[Zope3-checkins] CVS: Zope3/src/zope/app/event/tests - placelesssetup.py:1.1.2.2 test_directives.py:1.1.2.3 test_objectevent.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:28 -0500
Update of /cvs-repository/Zope3/src/zope/app/event/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/event/tests
Modified Files:
Tag: NameGeddon-branch
placelesssetup.py test_directives.py test_objectevent.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/event/tests/placelesssetup.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/event/tests/placelesssetup.py:1.1.2.1 Mon Dec 23 14:31:34 2002
+++ Zope3/src/zope/app/event/tests/placelesssetup.py Tue Dec 24 21:20:27 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 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.
-#
+#
##############################################################################
"""Unit test logic for setting up and tearing down basic infrastructure
@@ -39,8 +39,8 @@
r.append(event)
return r
-
-
+
+
class PlacelessSetup:
@@ -52,6 +52,6 @@
defineService("Events", IEventService)
provideService("Events", eventService)
-
+
del events[:]
eventService.globalSubscribe(EventRecorder)
=== Zope3/src/zope/app/event/tests/test_directives.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/event/tests/test_directives.py:1.1.2.2 Tue Dec 24 07:51:04 2002
+++ Zope3/src/zope/app/event/tests/test_directives.py Tue Dec 24 21:20:27 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.
-#
+#
##############################################################################
"""
@@ -35,7 +35,7 @@
class Test(PlacelessSetup, TestCase):
-
+
def setUp(self):
PlacelessSetup.setUp(self)
from zope.interfaces.event import IEventService
@@ -47,7 +47,7 @@
from zope.event.tests.subscriber import subscriber
# This should fail, since we're not subscribed
self.assertRaises(NotFoundError,unsubscribe,None,subscriber)
-
+
xmlconfig(makeconfig(
'''<directive
name="subscribe"
@@ -69,7 +69,7 @@
self.assertEqual(subscriber.notified,2) # NB: no increase ;-)
publish(None,DummyEvent())
self.assertEqual(subscriber.notified,4) # NB: increased by 2 ;-)
-
+
unsubscribe(subscriber)
def test_suite():
=== Zope3/src/zope/app/event/tests/test_objectevent.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/event/tests/test_objectevent.py:1.1.2.1 Mon Dec 23 14:31:35 2002
+++ Zope3/src/zope/app/event/tests/test_objectevent.py Tue Dec 24 21:20:27 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.
-#
+#
##############################################################################
"""
@@ -27,17 +27,17 @@
from zope.app.event.objectevent import ObjectContentModifiedEvent
class TestObjectAddedEvent(unittest.TestCase):
-
+
location = '/some/location'
object = object()
klass = ObjectAddedEvent
-
+
def setUp(self):
self.event = self.klass(self.object, self.location)
-
+
def testGetLocation(self):
self.assertEqual(self.event.location, self.location)
-
+
def testGetObject(self):
self.assertEqual(self.event.object, self.object)
@@ -54,15 +54,15 @@
class TestObjectRemovedEvent(TestObjectAddedEvent):
-
+
location = '/some/location'
-
+
def setUp(self):
self.event = ObjectRemovedEvent(self.object, self.location)
-
+
def testGetLocation(self):
self.assertEqual(self.event.location, self.location)
-
+
def testGetObject(self):
self.assertEqual(self.event.object, self.object)
@@ -71,14 +71,14 @@
class TestObjectMovedEvent(TestObjectAddedEvent):
from_location = '/some/other/location'
-
+
def setUp(self):
self.event = ObjectMovedEvent(self.object,
self.from_location, self.location)
def testFromLocation(self):
self.assertEqual(self.event.fromLocation, self.from_location)
-
+
def test_suite():
return unittest.TestSuite((unittest.makeSuite(TestObjectAddedEvent),
unittest.makeSuite(TestObjectModifiedEvent),