[z3-checkins] r19371 - in z3/Five/branch/Five-1.2: . tests

efge at codespeak.net efge at codespeak.net
Tue Nov 1 21:03:19 CET 2005


Author: efge
Date: Tue Nov  1 21:03:18 2005
New Revision: 19371

Modified:
   z3/Five/branch/Five-1.2/eventconfigure.py
   z3/Five/branch/Five-1.2/tests/event.txt
Log:
Do proper cleanups.

Modified: z3/Five/branch/Five-1.2/eventconfigure.py
==============================================================================
--- z3/Five/branch/Five-1.2/eventconfigure.py	(original)
+++ z3/Five/branch/Five-1.2/eventconfigure.py	Tue Nov  1 21:03:18 2005
@@ -25,6 +25,9 @@
     """Instances of the class will still see their old methods called."""
     deprecatedManageAddDeleteClasses.append(class_)
 
+def cleanUp():
+    deprecatedManageAddDeleteClasses[:] = []
+
 def containerEvents(_context):
     _context.action(
         discriminator=None,
@@ -38,3 +41,7 @@
         callable=setDeprecatedManageAddDelete,
         args=(class_,),
         )
+
+from zope.testing.cleanup import addCleanUp
+addCleanUp(cleanUp)
+del addCleanUp

Modified: z3/Five/branch/Five-1.2/tests/event.txt
==============================================================================
--- z3/Five/branch/Five-1.2/tests/event.txt	(original)
+++ z3/Five/branch/Five-1.2/tests/event.txt	Tue Nov  1 21:03:18 2005
@@ -221,6 +221,7 @@
   >>> from Products.Five.eventconfigure import setDeprecatedManageAddDelete
   >>> setDeprecatedManageAddDelete(MyContent)
   >>> setDeprecatedManageAddDelete(MyFolder)
+  >>> setDeprecatedManageAddDelete(MyOrderedFolder)
 
 Now some events are sent but the old manage_afterAdd method is also
 called correctly::


More information about the z3-checkins mailing list