Skip to content

Commit

Permalink
Use option flag from zope.testing to test Python 3 compatible doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sallner committed Sep 30, 2016
1 parent aa7eb35 commit 754f638
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/grokcore/view/ftests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def suiteFromPackage(name):
globs = dict(http=zope.app.wsgi.testlayer.http,
getRootFolder=getRootFolder)
optionflags = (
renormalizing.IGNORE_EXCEPTION_MODULE_IN_PYTHON2 +
doctest.ELLIPSIS +
doctest.NORMALIZE_WHITESPACE +
doctest.REPORT_NDIFF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
>>> grok.testing.grok(__name__)
Traceback (most recent call last):
...
ConfigurationExecutionError: martian.error.GrokError: Multiple possible ways
zope.configuration.config.ConfigurationExecutionError: martian.error.GrokError: Multiple possible ways
to render contentprovider <class 'grokcore.view.tests.contentprovider.contentprovider_render_and_template.ContentProvider'>.
It has both a 'render' method as well as an associated template.
in:
"""

from zope.interface import Interface
Expand Down
6 changes: 5 additions & 1 deletion src/grokcore/view/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import grokcore.view
from grokcore.view.templatereg import file_template_registry

optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
optionflags = (
doctest.NORMALIZE_WHITESPACE +
doctest.ELLIPSIS +
renormalizing.IGNORE_EXCEPTION_MODULE_IN_PYTHON2
)


def setUp(test):
Expand Down

0 comments on commit 754f638

Please sign in to comment.