summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2016-05-09 17:12:24 -0400
committerTres Seaver <tseaver@palladion.com>2016-05-09 17:12:24 -0400
commitba2503099f2669368e64c8d3d32a75783feddc60 (patch)
tree23b9c10f68e78a504704ee9ebd65f59987c80bf6
parentbc628f69bd07b5472013d8f7724163cc6f8b06b8 (diff)
parentccf8154791b3fcb6d5b9c9eb7c0b2f86789b34fb (diff)
downloadzope-proxy-ba2503099f2669368e64c8d3d32a75783feddc60.tar.gz
Merge pull request #14 from zopefoundation/fix-tests-wo-zope-security
Fix tests w/o zope security
-rw-r--r--buildout.cfg12
-rw-r--r--src/zope/proxy/tests/test_proxy.py8
2 files changed, 18 insertions, 2 deletions
diff --git a/buildout.cfg b/buildout.cfg
index 39fc87a..4ed495f 100644
--- a/buildout.cfg
+++ b/buildout.cfg
@@ -1,7 +1,15 @@
[buildout]
-parts = test
+parts =
+ test
+ test-wo-zope-security
develop = .
[test]
recipe = zc.recipe.testrunner
-eggs = zope.proxy
+eggs =
+ zope.proxy[testing]
+
+[test-wo-zope-security]
+recipe = zc.recipe.testrunner
+eggs =
+ zope.proxy
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