Skip to content

Commit

Permalink
Merge pull request #1 from plone/thet-zope4
Browse files Browse the repository at this point in the history
Zope4
  • Loading branch information
thet committed Jan 29, 2016
2 parents 08125ec + 8914d58 commit 345b087
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
6 changes: 5 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Changelog
1.1.2 (unreleased)
------------------

- Nothing changed yet.
- Fix test isolation problem.
[thet]

- Replace deprecated ``zope.testing.doctest`` import with ``doctest`` module from stdlib.
[thet]


1.1.1 (2015-03-21)
Expand Down
40 changes: 23 additions & 17 deletions plone/rfc822/tests.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
import unittest
from zope.testing import doctest
import zope.component.testing
import doctest
from plone.testing import layered
from plone.testing.zca import UNIT_TESTING


DOCFILES = [
'message.txt',
'fields.txt',
'supermodel.txt',
]

optionflags = doctest.ELLIPSIS


def test_suite():

return unittest.TestSuite((
doctest.DocFileSuite(
'message.txt',
tearDown=zope.component.testing.tearDown(),
optionflags=doctest.ELLIPSIS
),
doctest.DocFileSuite(
'fields.txt',
tearDown=zope.component.testing.tearDown(),
optionflags=doctest.ELLIPSIS
),
suite = unittest.TestSuite()
suite.addTests([
layered(
doctest.DocFileSuite(
'supermodel.txt',
tearDown=zope.component.testing.tearDown(),
optionflags=doctest.ELLIPSIS
docfile,
optionflags=optionflags,
),
))
layer=UNIT_TESTING
)
for docfile in DOCFILES
])
return suite
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
zip_safe=False,
extras_require={
'supermodel': ['plone.supermodel'],
'test': ['plone.testing'],
},
install_requires=[
'setuptools',
Expand Down

0 comments on commit 345b087

Please sign in to comment.