[Checkins]
SVN: grokcore.view/new/src/grokcore/view/ftests/test_grok_functional.py
Removed too much before. Bring back renormalizer for
mechanize exceptions
Philipp von Weitershausen
philikon at philikon.de
Sat Aug 2 09:53:08 EDT 2008
Log message for revision 89225:
Removed too much before. Bring back renormalizer for mechanize exceptions
Changed:
U grokcore.view/new/src/grokcore/view/ftests/test_grok_functional.py
-=-
Modified: grokcore.view/new/src/grokcore/view/ftests/test_grok_functional.py
===================================================================
--- grokcore.view/new/src/grokcore/view/ftests/test_grok_functional.py 2008-08-02 13:33:33 UTC (rev 89224)
+++ grokcore.view/new/src/grokcore/view/ftests/test_grok_functional.py 2008-08-02 13:53:07 UTC (rev 89225)
@@ -1,3 +1,4 @@
+import re
import unittest
import os.path
import grokcore.view
@@ -3,5 +4,5 @@
from pkg_resources import resource_listdir
-from zope.testing import doctest
+from zope.testing import doctest, renormalizing
from zope.app.testing.functional import (HTTPCaller, getRootFolder,
FunctionalTestSetup, sync, ZCMLLayer)
@@ -18,6 +19,11 @@
def tearDown(test):
FunctionalTestSetup().tearDown()
+checker = renormalizing.RENormalizing([
+ # Accommodate to exception wrapping in newer versions of mechanize
+ (re.compile(r'httperror_seek_wrapper:', re.M), 'HTTPError:'),
+ ])
+
def suiteFromPackage(name):
files = resource_listdir(__name__, name)
suite = unittest.TestSuite()
@@ -30,6 +36,7 @@
dottedname = 'grokcore.view.ftests.%s.%s' % (name, filename[:-3])
test = doctest.DocTestSuite(
dottedname, setUp=setUp, tearDown=tearDown,
+ checker=checker,
extraglobs=dict(http=HTTPCaller(),
getRootFolder=getRootFolder,
sync=sync),
More information about the Checkins
mailing list