Skip to content

Commit

Permalink
Doctest output checker: accept ComponentLookupError from two packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Aug 27, 2020
1 parent 25f5b2a commit f8f4dbc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions plone/tiles/tests/test_doctests.py
Expand Up @@ -10,11 +10,17 @@

class Py23DocChecker(doctest.OutputChecker):
def check_output(self, want, got, optionflags):
# new:
want = re.sub(
'zope.interface.interfaces.ComponentLookupError',
'ComponentLookupError',
want)
# old:
want = re.sub(
'zope.component.interfaces.ComponentLookupError',
'ComponentLookupError',
want)
if six.PY2:
want = re.sub(
'zope.interface.interfaces.ComponentLookupError',
'ComponentLookupError',
want)
want = re.sub(
'zExceptions.unauthorized.Unauthorized', 'Unauthorized', want)
got = re.sub("u'(.*?)'", "'\\1'", got)
Expand Down

0 comments on commit f8f4dbc

Please sign in to comment.