Skip to content

Commit

Permalink
100% coverage for test_location.py
Browse files Browse the repository at this point in the history
zope.location is a hard test dependency, no need for conditional logic.
  • Loading branch information
jamadden committed Sep 12, 2017
1 parent 7ef0a23 commit 12ce0b5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/zope/security/tests/test_location.py
Expand Up @@ -15,23 +15,14 @@
"""
import unittest

from zope.location.location import LocationProxy
from zope.security.tests import QuietWatchingChecker

def _skip_wo_zope_location(testfunc):
try:
import zope.location as zl
except ImportError:
zl = None

return unittest.skipIf(zl is None, "Need zope.location")(testfunc)


class LocationSecurityProxyTests(QuietWatchingChecker,
unittest.TestCase):

@_skip_wo_zope_location
def test_locationproxy_security(self):
from zope.location.location import LocationProxy
from zope.security.checker import defineChecker
from zope.security.checker import NamesChecker
from zope.security.proxy import ProxyFactory
Expand Down

0 comments on commit 12ce0b5

Please sign in to comment.