[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/securitypolicy/ soft dep to testing

Bernd Dorn bernd.dorn at lovelysystems.com
Tue Mar 27 02:58:37 EDT 2007


Log message for revision 73663:
  soft dep to testing

Changed:
  U   Zope3/trunk/src/zope/app/securitypolicy/principalpermission.py
  U   Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
  U   Zope3/trunk/src/zope/app/securitypolicy/rolepermission.py

-=-
Modified: Zope3/trunk/src/zope/app/securitypolicy/principalpermission.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/principalpermission.py	2007-03-27 06:52:40 UTC (rev 73662)
+++ Zope3/trunk/src/zope/app/securitypolicy/principalpermission.py	2007-03-27 06:58:36 UTC (rev 73663)
@@ -112,7 +112,12 @@
 principalPermissionManager = PrincipalPermissionManager()
 
 
-# Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
-from zope.testing.cleanup import addCleanUp
-addCleanUp(principalPermissionManager._clear)
-del addCleanUp
+# Register our cleanup with Testing.CleanUp to make writing unit tests
+# simpler.
+try:
+    from zope.testing.cleanup import addCleanUp
+except ImportError:
+    pass
+else:
+    addCleanUp(principalPermissionManager._clear)
+    del addCleanUp

Modified: Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/principalrole.py	2007-03-27 06:52:40 UTC (rev 73662)
+++ Zope3/trunk/src/zope/app/securitypolicy/principalrole.py	2007-03-27 06:58:36 UTC (rev 73663)
@@ -102,7 +102,12 @@
 # Roles are our rows, and principals are our columns
 principalRoleManager = PrincipalRoleManager()
 
-# Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
-from zope.testing.cleanup import addCleanUp
-addCleanUp(principalRoleManager._clear)
-del addCleanUp
+# Register our cleanup with Testing.CleanUp to make writing unit tests
+# simpler.
+try:
+    from zope.testing.cleanup import addCleanUp
+except ImportError:
+    pass
+else:
+    addCleanUp(principalRoleManager._clear)
+    del addCleanUp

Modified: Zope3/trunk/src/zope/app/securitypolicy/rolepermission.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/rolepermission.py	2007-03-27 06:52:40 UTC (rev 73662)
+++ Zope3/trunk/src/zope/app/securitypolicy/rolepermission.py	2007-03-27 06:58:36 UTC (rev 73663)
@@ -105,7 +105,13 @@
 # Permissions are our rows, and roles are our columns
 rolePermissionManager = RolePermissionManager()
 
-# Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
-from zope.testing.cleanup import addCleanUp
-addCleanUp(rolePermissionManager._clear)
-del addCleanUp
+
+# Register our cleanup with Testing.CleanUp to make writing unit tests
+# simpler.
+try:
+    from zope.testing.cleanup import addCleanUp
+except ImportError:
+    pass
+else:
+    addCleanUp(rolePermissionManager._clear)
+    del addCleanUp



More information about the Zope3-Checkins mailing list