Skip to content

Commit

Permalink
Use doctest instead of zope.testing.doctest and adapt test to changes…
Browse files Browse the repository at this point in the history
… in Five
  • Loading branch information
pbauer authored and thet committed Jan 29, 2016
1 parent 927fb26 commit e4674df
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Fixes:

- Fix ajax selection for add forms
[tomgross]
- Use doctest instead of zope.testing.doctest
[pbauer]


1.1.8 (2016-01-08)
Expand Down
2 changes: 1 addition & 1 deletion plone/app/z3cform/inline_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Let's verify that worked:
>>> context._REQUEST = request # evil test fake
>>> formWrapper = getMultiAdapter((context, request), name=u"test-form")
>>> formWrapper
<Products.Five.metaclass.MyFormWrapper object ...>
<Products.Five.browser.metaconfigure.MyFormWrapper object ...>
>>> formWrapper.form
<class 'plone.app.z3cform.tests.example.MyForm'>

Expand Down
14 changes: 7 additions & 7 deletions plone/app/z3cform/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from plone.browserlayer.layer import mark_layer
from zope.traversing.interfaces import BeforeTraverseEvent

import doctest
import unittest
import zope.component.testing
import zope.testing.doctest

ROBOT_TEST_LEVEL = 5

Expand Down Expand Up @@ -36,31 +36,31 @@ def test_content_provider(self):

def test_suite():

inlineValidationTests = zope.testing.doctest.DocFileSuite(
inlineValidationTests = doctest.DocFileSuite(
'inline_validation.rst',
package='plone.app.z3cform',
optionflags=(
zope.testing.doctest.ELLIPSIS |
zope.testing.doctest.NORMALIZE_WHITESPACE
doctest.ELLIPSIS |
doctest.NORMALIZE_WHITESPACE
)
)
inlineValidationTests.layer = PAZ3CForm_INTEGRATION_TESTING

suite = unittest.TestSuite([
unittest.makeSuite(IntegrationTests),
zope.testing.doctest.DocFileSuite(
doctest.DocFileSuite(
'wysiwyg/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
zope.testing.doctest.DocFileSuite(
doctest.DocFileSuite(
'queryselect/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
zope.testing.doctest.DocTestSuite(
doctest.DocTestSuite(
'plone.app.z3cform.wysiwyg.widget',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
Expand Down

0 comments on commit e4674df

Please sign in to comment.