From 6666baebfae8e51bbdb5b49d5b3452667294bcbe Mon Sep 17 00:00:00 2001 From: "Guido A.J. Stevens" Date: Mon, 15 Jan 2018 14:51:52 +0000 Subject: [PATCH] Remove outdated exception handling from tests --- src/grokcore/viewlet/tests/test_functional.py | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/grokcore/viewlet/tests/test_functional.py b/src/grokcore/viewlet/tests/test_functional.py index 314d502..4675a98 100644 --- a/src/grokcore/viewlet/tests/test_functional.py +++ b/src/grokcore/viewlet/tests/test_functional.py @@ -1,18 +1,3 @@ -############################################################################## -# -# Copyright (c) 2006-2007 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## - -import re import unittest import doctest import grokcore.viewlet @@ -20,7 +5,6 @@ import zope.app.wsgi.testlayer from pkg_resources import resource_listdir -from zope.testing import renormalizing class Layer( @@ -31,12 +15,6 @@ class Layer( layer = Layer(grokcore.viewlet, allowTearDown=True) -checker = renormalizing.RENormalizing([ - # Accommodate to exception wrapping in newer versions of mechanize - (re.compile(r'httperror_seek_wrapper:', re.M), 'HTTPError:'), - ]) - - def suiteFromPackage(name): layer_dir = 'functional' files = resource_listdir(__name__, '{}/{}'.format(layer_dir, name)) @@ -51,13 +29,12 @@ def suiteFromPackage(name): layer_dir, name, filename[:-3]) test = doctest.DocTestSuite( dottedname, - checker=checker, extraglobs=dict(getRootFolder=layer.getRootFolder,), optionflags=( doctest.ELLIPSIS + doctest.NORMALIZE_WHITESPACE + doctest.REPORT_NDIFF + - renormalizing.IGNORE_EXCEPTION_MODULE_IN_PYTHON2)) + doctest.IGNORE_EXCEPTION_DETAIL)) test.layer = layer suite.addTest(test)