Skip to content

Commit

Permalink
Test fix: clearZCML was removed from zope.component.tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Jan 26, 2016
1 parent 7b0ea67 commit d98b9e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
1.0.5 (unreleased)
------------------

- Test fix: ``clearZCML`` was removed from ``zope.component.tests``.
[thet]

- Cleanup: PEP8, plone-coding conventions, ReST fixes, documentation
overhaul, et al.
[jensens]
Expand Down
12 changes: 11 additions & 1 deletion plone/resource/tests/test_zcml.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import unittest2 as unittest
from zope.component.tests import clearZCML
from zope.component.testing import tearDown
from zope.configuration.exceptions import ConfigurationError

Expand All @@ -10,6 +9,17 @@
from plone.resource.interfaces import IResourceDirectory


def clearZCML(test=None):
# Copy from ``zope.component.tests.examples``
from zope.configuration.xmlconfig import XMLConfig
import zope.component
from zope.component.testing import setUp
from zope.component.testing import tearDown
tearDown()
setUp()
XMLConfig('meta.zcml', zope.component)()


def runSnippet(snippet, dist='plone.resource.tests'):
template = """\
<configure xmlns="http://namespaces.zope.org/zope"
Expand Down

0 comments on commit d98b9e7

Please sign in to comment.