[Checkins] SVN: GenericSetup/trunk/tests/common.py - fixed Zope 2.8 compatibility (cleanUp is not needed for the Zope 2.8 setup)

Yvo Schubbe y.2006_ at wcm-solutions.de
Sat Jun 3 08:07:11 EDT 2006


Log message for revision 68474:
  - fixed Zope 2.8 compatibility (cleanUp is not needed for the Zope 2.8 setup)

Changed:
  U   GenericSetup/trunk/tests/common.py

-=-
Modified: GenericSetup/trunk/tests/common.py
===================================================================
--- GenericSetup/trunk/tests/common.py	2006-06-03 11:53:18 UTC (rev 68473)
+++ GenericSetup/trunk/tests/common.py	2006-06-03 12:07:11 UTC (rev 68474)
@@ -22,7 +22,6 @@
 from Acquisition import Implicit
 from Testing.ZopeTestCase import ZopeTestCase
 from zope.interface import implements
-from zope.testing.cleanup import cleanUp
 
 from Products.Five import zcml
 from Products.GenericSetup.interfaces import IExportContext
@@ -67,7 +66,12 @@
         from AccessControl.SecurityManagement import noSecurityManager
         noSecurityManager()
         ZopeTestCase.tearDown(self)
-        cleanUp()
+        try:
+            from zope.testing.cleanup import cleanUp
+            cleanUp()
+        except ImportError:
+            # BBB: for Zope 2.8
+            pass
 
 
 class DOMComparator:



More information about the Checkins mailing list