summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2016-05-09 12:06:30 -0400
committerTres Seaver <tseaver@palladion.com>2016-05-09 12:06:30 -0400
commitd910979a6485289571ec1c822c764eff33580287 (patch)
tree58dae9b0aa7cfd6111ab6953b0ef748429918409
parentbc628f69bd07b5472013d8f7724163cc6f8b06b8 (diff)
downloadzope-proxy-d910979a6485289571ec1c822c764eff33580287.tar.gz
Skip tests dependent on zope.security if it is missing.
-rw-r--r--src/zope/proxy/tests/test_proxy.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zope/proxy/tests/test_proxy.py b/src/zope/proxy/tests/test_proxy.py
index 176ce2b..ff8510e 100644
--- a/src/zope/proxy/tests/test_proxy.py
+++ b/src/zope/proxy/tests/test_proxy.py
@@ -15,6 +15,13 @@
"""
import unittest
+try:
+ import zope.security
+except ImportError:
+ _HAVE_ZOPE_SECURITY = False
+else:
+ _HAVE_ZOPE_SECURITY = True
+
class ModuleConformanceCase(unittest.TestCase):
@@ -1302,6 +1309,7 @@ class Test_py_removeAllProxies(unittest.TestCase):
proxy2 = self._makeProxy(proxy)
self.assertTrue(self._callFUT(proxy2) is c)
+ @unittest.skipUnless(_HAVE_ZOPE_SECURITY, 'zope.security missing')
def test_security_proxy(self):
class C(object):
pass