From 83aa5017290ae0375e293393ade3723e00239097 Mon Sep 17 00:00:00 2001 From: jensens Date: Fri, 17 Aug 2018 09:23:36 +0200 Subject: [PATCH] [fc] Repository: plone.locking Branch: refs/heads/master Date: 2018-03-21T22:05:02+01:00 Author: Philip Bauer (pbauer) Commit: https://github.com/plone/plone.locking/commit/ab09c43decdf128c23fc67245b26f0434315077e fix import for zope4 Files changed: M plone/locking/lockable.py Repository: plone.locking Branch: refs/heads/master Date: 2018-03-22T11:58:31+01:00 Author: Philip Bauer (pbauer) Commit: https://github.com/plone/plone.locking/commit/d3f80e536bc816df50c94087f272f00691144f90 use class decorator for py3 Files changed: M plone/locking/lockable.py Repository: plone.locking Branch: refs/heads/master Date: 2018-06-14T23:09:44+02:00 Author: Johannes Raggam (thet) Commit: https://github.com/plone/plone.locking/commit/18d41b12b212052eed04565082750816001f32c5 More Python 2 / 3 compatibility fixes. Files changed: M CHANGES.rst M plone/locking/lockable.py M plone/locking/testing.py M plone/locking/tests/test_functional.py Repository: plone.locking Branch: refs/heads/master Date: 2018-07-25T12:00:34-03:00 Author: hvelarde (hvelarde) Commit: https://github.com/plone/plone.locking/commit/3ab128e6a0e663ae96e66ec0406fb90ed0e8e978 Fix old-division Files changed: M plone/locking/browser/locking.py M plone/locking/interfaces.py Repository: plone.locking Branch: refs/heads/master Date: 2018-08-17T09:23:36+02:00 Author: Jens W. Klein (jensens) Commit: https://github.com/plone/plone.locking/commit/6496390a55b026d9aad5a2233956abd8f09ba887 Merge pull request #17 from plone/python3 Python3 Files changed: M CHANGES.rst M plone/locking/browser/locking.py M plone/locking/interfaces.py M plone/locking/lockable.py M plone/locking/testing.py M plone/locking/tests/test_functional.py --- last_commit.txt | 91 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 25 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 155194f027..aa6496b96e 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,45 +1,86 @@ -Repository: plone.memoize +Repository: plone.locking Branch: refs/heads/master -Date: 2018-08-17T08:25:00+02:00 -Author: Michael Howitz (icemac) -Commit: https://github.com/plone/plone.memoize/commit/d1a41b48879431158bc7c510e692f2c8edf50b19 +Date: 2018-03-21T22:05:02+01:00 +Author: Philip Bauer (pbauer) +Commit: https://github.com/plone/plone.locking/commit/ab09c43decdf128c23fc67245b26f0434315077e -Re-enable Travis-CI +fix import for zope4 -This package can be used outside Plone so it should be tested outside, too. +Files changed: +M plone/locking/lockable.py + +b'diff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex 6c9305c..138250e 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -7,7 +7,11 @@\n from zope.component import getUtility\n \n from AccessControl import getSecurityManager\n-from webdav.LockItem import LockItem\n+try:\n+ from OFS.LockItem import LockItem\n+except ImportError:\n+ # Zope2\n+ from webdav.LockItem import LockItem\n \n from plone.registry.interfaces import IRegistry\n from Products.CMFPlone.interfaces import IEditingSchema\n' + +Repository: plone.locking + + +Branch: refs/heads/master +Date: 2018-03-22T11:58:31+01:00 +Author: Philip Bauer (pbauer) +Commit: https://github.com/plone/plone.locking/commit/d3f80e536bc816df50c94087f272f00691144f90 + +use class decorator for py3 + +Files changed: +M plone/locking/lockable.py + +b'diff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex 138250e..d35fc77 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -1,5 +1,5 @@\n from zope.interface import implementer\n-from zope.component import adapts, queryAdapter\n+from zope.component import adapter, queryAdapter\n \n from persistent.dict import PersistentDict\n \n@@ -32,11 +32,11 @@ def safeWrite(*args):\n ANNOTATION_KEY = \'plone.locking\'\n \n \n+@adapter(ITTWLockable)\n @implementer(IRefreshableLockable)\n class TTWLockable(object):\n """An object that is being locked through-the-web\n """\n- adapts(ITTWLockable)\n \n def __init__(self, context):\n self.context = context\n' + +Repository: plone.locking + + +Branch: refs/heads/master +Date: 2018-06-14T23:09:44+02:00 +Author: Johannes Raggam (thet) +Commit: https://github.com/plone/plone.locking/commit/18d41b12b212052eed04565082750816001f32c5 + +More Python 2 / 3 compatibility fixes. + +Files changed: +M CHANGES.rst +M plone/locking/lockable.py +M plone/locking/testing.py +M plone/locking/tests/test_functional.py + +b"diff --git a/CHANGES.rst b/CHANGES.rst\nindex d52fe82..efbdc4d 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- More Python 2 / 3 compatibility fixes.\n+ [thet]\n \n \n 2.2.2 (2018-02-05)\ndiff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex d35fc77..98c3f0a 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -54,7 +54,8 @@ def lock(self, lock_type=STEALABLE_LOCK, children=False):\n if not self.locked():\n user = getSecurityManager().getUser()\n depth = children and 'infinity' or 0\n- lock = LockItem(user, depth=depth, timeout=lock_type.timeout * 60)\n+ timeout = int(lock_type.timeout * 60)\n+ lock = LockItem(user, depth=depth, timeout=timeout)\n token = lock.getLockToken()\n self.context._v_safe_write = True\n self.context.wl_setLock(token, lock)\ndiff --git a/plone/locking/testing.py b/plone/locking/testing.py\nindex 7afddbd..425e7ff 100644\n--- a/plone/locking/testing.py\n+++ b/plone/locking/testing.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE\n from plone.app.testing import applyProfile\n from plone.app.testing import PloneSandboxLayer\n from plone.app.testing.layers import FunctionalTesting\n@@ -8,14 +9,12 @@\n \n \n class PloneLockingLayer(PloneSandboxLayer):\n+ defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)\n \n def setUpZope(self, app, configurationContext):\n import plone.locking\n self.loadZCML(package=plone.locking)\n \n- def setUpPloneSite(self, portal):\n- applyProfile(portal, 'plone.app.contenttypes:default')\n-\n \n PLONE_LOCKING_FIXTURE = PloneLockingLayer()\n \ndiff --git a/plone/locking/tests/test_functional.py b/plone/locking/tests/test_functional.py\nindex fc14087..b3481ed 100644\n--- a/plone/locking/tests/test_functional.py\n+++ b/plone/locking/tests/test_functional.py\n@@ -11,20 +11,11 @@\n import unittest\n \n \n-doctests = (\n- 'locking.rst',\n-)\n-\n-\n-def add_member(portal, username):\n- portal_membership = getToolByName(portal, 'portal_membership')\n- portal_membership.addMember(username, 'secret', ('Member', ), [])\n-\n-\n def setup(doctest):\n portal = doctest.globs['layer']['portal']\n- add_member(portal, 'member1', )\n- add_member(portal, 'member2', )\n+ portal_membership = getToolByName(portal, 'portal_membership')\n+ portal_membership.addMember('member1', 'secret', ('Member', ), [])\n+ portal_membership.addMember('member2', 'secret', ('Member', ), [])\n \n logout()\n login(portal, 'member1')\n@@ -35,18 +26,15 @@ def setup(doctest):\n \n def test_suite():\n suite = unittest.TestSuite()\n- tests = [\n+ suite.addTest(\n layered(\n doctest.DocFileSuite(\n- 'tests/{0}'.format(test_file),\n+ 'tests/locking.rst',\n package='plone.locking',\n optionflags=optionflags,\n setUp=setup,\n ),\n layer=PLONE_LOCKING_FUNCTIONAL_TESTING,\n )\n- for test_file in doctests\n- ]\n- suite.addTests(tests)\n+ )\n return suite\n-\n" + +Repository: plone.locking + + +Branch: refs/heads/master +Date: 2018-07-25T12:00:34-03:00 +Author: hvelarde (hvelarde) +Commit: https://github.com/plone/plone.locking/commit/3ab128e6a0e663ae96e66ec0406fb90ed0e8e978 -Currently the tests fail because it is not compatible with current versions of the packages it depends on. -(I am planning to work on the tests failures later on.) +Fix old-division Files changed: -A .coveragerc -A .travis.yml -A tox.ini -M .gitignore -M buildout.cfg +M plone/locking/browser/locking.py +M plone/locking/interfaces.py -b'diff --git a/.coveragerc b/.coveragerc\nnew file mode 100644\nindex 0000000..36be903\n--- /dev/null\n+++ b/.coveragerc\n@@ -0,0 +1,6 @@\n+[run]\n+branch = True\n+source = plone\n+\n+[report]\n+precision = 2\ndiff --git a/.gitignore b/.gitignore\nindex 496058b..485551b 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -8,4 +8,5 @@ __pycache__\n .tox\n .eggs\n .coverage\n+coverage.xml\n /htmlcov\ndiff --git a/.travis.yml b/.travis.yml\nnew file mode 100644\nindex 0000000..78a4d14\n--- /dev/null\n+++ b/.travis.yml\n@@ -0,0 +1,21 @@\n+language: python\n+sudo: false\n+python:\n+ - 2.7\n+ - 3.5\n+ - 3.6\n+install:\n+ - pip install zc.buildout\n+ - pip install coveralls coverage\n+ - buildout bootstrap\n+ - buildout install test\n+script:\n+ - coverage run bin/tests -v\n+after_success:\n+ - coveralls\n+notifications:\n+ email: false\n+cache:\n+ pip: true\n+ directories:\n+ - eggs/\ndiff --git a/buildout.cfg b/buildout.cfg\nindex 392c74e..bd5efd5 100644\n--- a/buildout.cfg\n+++ b/buildout.cfg\n@@ -1,15 +1,34 @@\n [buildout]\n+extends = http://dist.plone.org/release/5-latest/versions.cfg\n develop = .\n-parts = test createcoverage\n+parts = test\n+\n+[versions]\n+persistent = >= 4\n+python-gettext = >= 3\n+zc.recipe.testrunner = >= 2\n+zope.annotation = >= 4\n+zope.browser = >= 2\n+zope.component = >= 4\n+zope.configuration = >= 4\n+zope.contenttype = >= 4\n+zope.deprecation = >= 4\n+zope.event = >= 4\n+zope.exceptions = >= 4\n+zope.i18n = >= 4\n+zope.i18nmessageid = >= 4\n+zope.interface = >= 4\n+zope.location = >= 4\n+zope.proxy = >= 4\n+zope.publisher = >= 4\n+zope.ramcache = >= 2\n+zope.schema = >= 4\n+zope.security = >= 4\n+zope.testing = >= 4\n+zope.testrunner = >= 4\n+plone.memoize =\n \n [test]\n recipe = zc.recipe.testrunner\n eggs =\n plone.memoize [test]\n-\n-[createcoverage]\n-recipe = zc.recipe.egg\n-dependent-scripts = true\n-eggs =\n- createcoverage\n- ${test:eggs}\ndiff --git a/tox.ini b/tox.ini\nnew file mode 100644\nindex 0000000..7ebdcfb\n--- /dev/null\n+++ b/tox.ini\n@@ -0,0 +1,30 @@\n+[tox]\n+envlist = py27,\n+ py35,\n+ py36,\n+ coverage-report,\n+\n+[testenv]\n+commands =\n+ {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap\n+ {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test\n+ coverage run {envbindir}/test {posargs:-vc}\n+skip_install = true\n+deps =\n+ coverage\n+ zc.buildout\n+setenv =\n+ COVERAGE_FILE=.coverage.{envname}\n+\n+[testenv:coverage-report]\n+basepython = python3.6\n+deps = coverage\n+setenv =\n+ COVERAGE_FILE=.coverage\n+skip_install = true\n+commands =\n+ coverage erase\n+ coverage combine\n+ coverage html -i\n+ coverage xml -i\n+ coverage report -i --fail-under=79\n' +b'diff --git a/plone/locking/browser/locking.py b/plone/locking/browser/locking.py\nindex cbfa0c4..7f4145e 100644\n--- a/plone/locking/browser/locking.py\n+++ b/plone/locking/browser/locking.py\n@@ -141,8 +141,8 @@ def _getNiceTimeDifference(self, baseTime):\n days = int(round(now - DateTime(baseTime)))\n delta = timedelta(now - DateTime(baseTime))\n days = delta.days\n- hours = int(delta.seconds / 3600)\n- minutes = (delta.seconds - (hours * 3600)) / 60\n+ hours = delta.seconds // 3600\n+ minutes = (delta.seconds - (hours * 3600)) // 60\n \n dateString = u""\n if days == 0:\ndiff --git a/plone/locking/interfaces.py b/plone/locking/interfaces.py\nindex beef035..4824e39 100644\n--- a/plone/locking/interfaces.py\n+++ b/plone/locking/interfaces.py\n@@ -7,7 +7,7 @@\n \n # Timeouts are expressed in minutes\n DEFAULT_TIMEOUT = 10\n-MAX_TIMEOUT = ((2 ** 32) - 1) / 60\n+MAX_TIMEOUT = ((2 ** 32) - 1) // 60\n \n \n class ILockType(Interface):\n' -Repository: plone.memoize +Repository: plone.locking Branch: refs/heads/master -Date: 2018-08-17T09:18:07+02:00 +Date: 2018-08-17T09:23:36+02:00 Author: Jens W. Klein (jensens) -Commit: https://github.com/plone/plone.memoize/commit/cde60f7f01bbf6b79e96af22a993c231c2c4a935 +Commit: https://github.com/plone/plone.locking/commit/6496390a55b026d9aad5a2233956abd8f09ba887 -Merge pull request #9 from plone/re-enable-travis +Merge pull request #17 from plone/python3 -Re-enable Travis-CI +Python3 Files changed: -A .coveragerc -A .travis.yml -A tox.ini -M .gitignore -M buildout.cfg +M CHANGES.rst +M plone/locking/browser/locking.py +M plone/locking/interfaces.py +M plone/locking/lockable.py +M plone/locking/testing.py +M plone/locking/tests/test_functional.py -b'diff --git a/.coveragerc b/.coveragerc\nnew file mode 100644\nindex 0000000..36be903\n--- /dev/null\n+++ b/.coveragerc\n@@ -0,0 +1,6 @@\n+[run]\n+branch = True\n+source = plone\n+\n+[report]\n+precision = 2\ndiff --git a/.gitignore b/.gitignore\nindex 496058b..485551b 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -8,4 +8,5 @@ __pycache__\n .tox\n .eggs\n .coverage\n+coverage.xml\n /htmlcov\ndiff --git a/.travis.yml b/.travis.yml\nnew file mode 100644\nindex 0000000..78a4d14\n--- /dev/null\n+++ b/.travis.yml\n@@ -0,0 +1,21 @@\n+language: python\n+sudo: false\n+python:\n+ - 2.7\n+ - 3.5\n+ - 3.6\n+install:\n+ - pip install zc.buildout\n+ - pip install coveralls coverage\n+ - buildout bootstrap\n+ - buildout install test\n+script:\n+ - coverage run bin/tests -v\n+after_success:\n+ - coveralls\n+notifications:\n+ email: false\n+cache:\n+ pip: true\n+ directories:\n+ - eggs/\ndiff --git a/buildout.cfg b/buildout.cfg\nindex 392c74e..bd5efd5 100644\n--- a/buildout.cfg\n+++ b/buildout.cfg\n@@ -1,15 +1,34 @@\n [buildout]\n+extends = http://dist.plone.org/release/5-latest/versions.cfg\n develop = .\n-parts = test createcoverage\n+parts = test\n+\n+[versions]\n+persistent = >= 4\n+python-gettext = >= 3\n+zc.recipe.testrunner = >= 2\n+zope.annotation = >= 4\n+zope.browser = >= 2\n+zope.component = >= 4\n+zope.configuration = >= 4\n+zope.contenttype = >= 4\n+zope.deprecation = >= 4\n+zope.event = >= 4\n+zope.exceptions = >= 4\n+zope.i18n = >= 4\n+zope.i18nmessageid = >= 4\n+zope.interface = >= 4\n+zope.location = >= 4\n+zope.proxy = >= 4\n+zope.publisher = >= 4\n+zope.ramcache = >= 2\n+zope.schema = >= 4\n+zope.security = >= 4\n+zope.testing = >= 4\n+zope.testrunner = >= 4\n+plone.memoize =\n \n [test]\n recipe = zc.recipe.testrunner\n eggs =\n plone.memoize [test]\n-\n-[createcoverage]\n-recipe = zc.recipe.egg\n-dependent-scripts = true\n-eggs =\n- createcoverage\n- ${test:eggs}\ndiff --git a/tox.ini b/tox.ini\nnew file mode 100644\nindex 0000000..7ebdcfb\n--- /dev/null\n+++ b/tox.ini\n@@ -0,0 +1,30 @@\n+[tox]\n+envlist = py27,\n+ py35,\n+ py36,\n+ coverage-report,\n+\n+[testenv]\n+commands =\n+ {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap\n+ {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test\n+ coverage run {envbindir}/test {posargs:-vc}\n+skip_install = true\n+deps =\n+ coverage\n+ zc.buildout\n+setenv =\n+ COVERAGE_FILE=.coverage.{envname}\n+\n+[testenv:coverage-report]\n+basepython = python3.6\n+deps = coverage\n+setenv =\n+ COVERAGE_FILE=.coverage\n+skip_install = true\n+commands =\n+ coverage erase\n+ coverage combine\n+ coverage html -i\n+ coverage xml -i\n+ coverage report -i --fail-under=79\n' +b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex d52fe82..efbdc4d 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- More Python 2 / 3 compatibility fixes.\n+ [thet]\n \n \n 2.2.2 (2018-02-05)\ndiff --git a/plone/locking/browser/locking.py b/plone/locking/browser/locking.py\nindex cbfa0c4..7f4145e 100644\n--- a/plone/locking/browser/locking.py\n+++ b/plone/locking/browser/locking.py\n@@ -141,8 +141,8 @@ def _getNiceTimeDifference(self, baseTime):\n days = int(round(now - DateTime(baseTime)))\n delta = timedelta(now - DateTime(baseTime))\n days = delta.days\n- hours = int(delta.seconds / 3600)\n- minutes = (delta.seconds - (hours * 3600)) / 60\n+ hours = delta.seconds // 3600\n+ minutes = (delta.seconds - (hours * 3600)) // 60\n \n dateString = u""\n if days == 0:\ndiff --git a/plone/locking/interfaces.py b/plone/locking/interfaces.py\nindex beef035..4824e39 100644\n--- a/plone/locking/interfaces.py\n+++ b/plone/locking/interfaces.py\n@@ -7,7 +7,7 @@\n \n # Timeouts are expressed in minutes\n DEFAULT_TIMEOUT = 10\n-MAX_TIMEOUT = ((2 ** 32) - 1) / 60\n+MAX_TIMEOUT = ((2 ** 32) - 1) // 60\n \n \n class ILockType(Interface):\ndiff --git a/plone/locking/lockable.py b/plone/locking/lockable.py\nindex 6c9305c..98c3f0a 100644\n--- a/plone/locking/lockable.py\n+++ b/plone/locking/lockable.py\n@@ -1,5 +1,5 @@\n from zope.interface import implementer\n-from zope.component import adapts, queryAdapter\n+from zope.component import adapter, queryAdapter\n \n from persistent.dict import PersistentDict\n \n@@ -7,7 +7,11 @@\n from zope.component import getUtility\n \n from AccessControl import getSecurityManager\n-from webdav.LockItem import LockItem\n+try:\n+ from OFS.LockItem import LockItem\n+except ImportError:\n+ # Zope2\n+ from webdav.LockItem import LockItem\n \n from plone.registry.interfaces import IRegistry\n from Products.CMFPlone.interfaces import IEditingSchema\n@@ -28,11 +32,11 @@ def safeWrite(*args):\n ANNOTATION_KEY = \'plone.locking\'\n \n \n+@adapter(ITTWLockable)\n @implementer(IRefreshableLockable)\n class TTWLockable(object):\n """An object that is being locked through-the-web\n """\n- adapts(ITTWLockable)\n \n def __init__(self, context):\n self.context = context\n@@ -50,7 +54,8 @@ def lock(self, lock_type=STEALABLE_LOCK, children=False):\n if not self.locked():\n user = getSecurityManager().getUser()\n depth = children and \'infinity\' or 0\n- lock = LockItem(user, depth=depth, timeout=lock_type.timeout * 60)\n+ timeout = int(lock_type.timeout * 60)\n+ lock = LockItem(user, depth=depth, timeout=timeout)\n token = lock.getLockToken()\n self.context._v_safe_write = True\n self.context.wl_setLock(token, lock)\ndiff --git a/plone/locking/testing.py b/plone/locking/testing.py\nindex 7afddbd..425e7ff 100644\n--- a/plone/locking/testing.py\n+++ b/plone/locking/testing.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE\n from plone.app.testing import applyProfile\n from plone.app.testing import PloneSandboxLayer\n from plone.app.testing.layers import FunctionalTesting\n@@ -8,14 +9,12 @@\n \n \n class PloneLockingLayer(PloneSandboxLayer):\n+ defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)\n \n def setUpZope(self, app, configurationContext):\n import plone.locking\n self.loadZCML(package=plone.locking)\n \n- def setUpPloneSite(self, portal):\n- applyProfile(portal, \'plone.app.contenttypes:default\')\n-\n \n PLONE_LOCKING_FIXTURE = PloneLockingLayer()\n \ndiff --git a/plone/locking/tests/test_functional.py b/plone/locking/tests/test_functional.py\nindex fc14087..b3481ed 100644\n--- a/plone/locking/tests/test_functional.py\n+++ b/plone/locking/tests/test_functional.py\n@@ -11,20 +11,11 @@\n import unittest\n \n \n-doctests = (\n- \'locking.rst\',\n-)\n-\n-\n-def add_member(portal, username):\n- portal_membership = getToolByName(portal, \'portal_membership\')\n- portal_membership.addMember(username, \'secret\', (\'Member\', ), [])\n-\n-\n def setup(doctest):\n portal = doctest.globs[\'layer\'][\'portal\']\n- add_member(portal, \'member1\', )\n- add_member(portal, \'member2\', )\n+ portal_membership = getToolByName(portal, \'portal_membership\')\n+ portal_membership.addMember(\'member1\', \'secret\', (\'Member\', ), [])\n+ portal_membership.addMember(\'member2\', \'secret\', (\'Member\', ), [])\n \n logout()\n login(portal, \'member1\')\n@@ -35,18 +26,15 @@ def setup(doctest):\n \n def test_suite():\n suite = unittest.TestSuite()\n- tests = [\n+ suite.addTest(\n layered(\n doctest.DocFileSuite(\n- \'tests/{0}\'.format(test_file),\n+ \'tests/locking.rst\',\n package=\'plone.locking\',\n optionflags=optionflags,\n setUp=setup,\n ),\n layer=PLONE_LOCKING_FUNCTIONAL_TESTING,\n )\n- for test_file in doctests\n- ]\n- suite.addTests(tests)\n+ )\n return suite\n-\n'