diff options
author | Jason Madden <jamadden@gmail.com> | 2017-09-11 13:24:54 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2017-09-11 16:15:46 -0500 |
commit | e2d292a3623dd989a0d004a9a2bacc0d24346ef8 (patch) | |
tree | 6d59b963245ff157a2c54a3292b9fd3ca0b091aa | |
parent | b64b5d348a6519ee7989040ce7f99bb586584a7b (diff) | |
download | zope-security-e2d292a3623dd989a0d004a9a2bacc0d24346ef8.tar.gz |
Remove unused internal files from tests/
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | src/zope/security/tests/adapter.py | 66 | ||||
-rw-r--r-- | src/zope/security/tests/components.py | 43 | ||||
-rw-r--r-- | src/zope/security/tests/emptymodule.py | 18 | ||||
-rw-r--r-- | src/zope/security/tests/module.py | 10 | ||||
-rw-r--r-- | src/zope/security/tests/modulehookup.py | 30 |
6 files changed, 7 insertions, 162 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index cfeedca..3ce936f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,6 +43,8 @@ Changes - Fix watching checkers (``ZOPE_WATCH_CHECKERS=1``) in pure-Python mode. See `issue 8 <https://github.com/zopefoundation/zope.security/issues/8>`_. +- Remove unused internal files from ``tests/``. + 4.1.1 (2017-05-17) ------------------ diff --git a/src/zope/security/tests/adapter.py b/src/zope/security/tests/adapter.py deleted file mode 100644 index 23b20ba..0000000 --- a/src/zope/security/tests/adapter.py +++ /dev/null @@ -1,66 +0,0 @@ -############################################################################## -# -# Copyright (c) 2004 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Sample adapter class for testing -""" -from zope.interface import Interface -from zope.interface import implementer -from zope.component import adapter -from .components import IContent - -class I1(Interface): - pass - -class I2(Interface): - pass - -class I3(Interface): - def f1(): pass - def f2(): pass - def f3(): pass - -class IS(Interface): - pass - - -class Adapter(object): - def __init__(self, *args): - self.context = args - -@implementer(I1) -class A1(Adapter): - pass - -@implementer(I2) -class A2(Adapter): - pass - -@adapter(IContent, I1, I2) -@implementer(I3) -class A3(Adapter): - pass - -class A4: - pass - -a4 = A4() - -@implementer(I1, I2) -class A5: - pass - -a5 = A5() - -def Handler(content, *args): - # uninteresting handler - content.args = getattr(content, 'args', ()) + (args, ) diff --git a/src/zope/security/tests/components.py b/src/zope/security/tests/components.py deleted file mode 100644 index bdd2b91..0000000 --- a/src/zope/security/tests/components.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# -# Copyright (c) 2002 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Components for testing -""" -from zope.interface import Interface, Attribute, implementer -from zope.component import adapter - -class IAppb(Interface): - a = Attribute('test attribute') - def f(): "test func" - -class IApp(IAppb): - pass - -class IContent(Interface): pass - -@implementer(IContent) -class Content(object): - pass - -@adapter(IContent) -@implementer(IApp) -class Comp(object): - - def __init__(self, *args): - # Ignore arguments passed to constructor - pass - - a = 1 - def f(): pass - -comp = Comp() diff --git a/src/zope/security/tests/emptymodule.py b/src/zope/security/tests/emptymodule.py deleted file mode 100644 index f35cab6..0000000 --- a/src/zope/security/tests/emptymodule.py +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################## -# -# Copyright (c) 2001, 2002 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""This empty module is for containing objects used in the course of tests. - -(There is a problem with the way the unit tests interact with the modules -being tests, so the objects can't be expected to show up in place.) -""" diff --git a/src/zope/security/tests/module.py b/src/zope/security/tests/module.py index 3ae0ffb..5b26ff5 100644 --- a/src/zope/security/tests/module.py +++ b/src/zope/security/tests/module.py @@ -23,21 +23,21 @@ from zope.schema import Text class I(Interface): def m1(): - pass + "m1" def m2(): - pass + "m2" class I2(I): def m4(): - pass + "m4" class I3(Interface): def m3(): - pass + "m3" class I4(Interface): def m2(): - pass + "m2" class S(Interface): diff --git a/src/zope/security/tests/modulehookup.py b/src/zope/security/tests/modulehookup.py deleted file mode 100644 index eb56905..0000000 --- a/src/zope/security/tests/modulehookup.py +++ /dev/null @@ -1,30 +0,0 @@ -############################################################################## -# -# Copyright (c) 2001, 2002 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Preliminaries to hookup a test suite with the external TestModule. - -This is necessary because the test framework interferes with seeing changes in -the running modules via the module namespace. This enables having some -subject classes, instances, permissions, etc, that don't live in the test -modules, themselves. -""" -from zope.interface import Interface - -from zope.security.tests import emptymodule as TestModule - -class I(Interface): - def m1(): - pass - def m2(): - pass - |