Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7 from gyst/master
Browse files Browse the repository at this point in the history
Remove outdated exception handling in tests
  • Loading branch information
janwijbrand committed Feb 21, 2018
2 parents eefbb77 + c77ca79 commit 0667901
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/grokcore/json/tests/test_functional.py
@@ -1,14 +1,12 @@
import doctest
import grokcore.json
import re
import six
import unittest
import zope.app.wsgi.testlayer
import zope.testbrowser.wsgi

from pkg_resources import resource_listdir
from zope.app.wsgi.testlayer import http
from zope.testing import renormalizing


class Layer(
Expand All @@ -19,12 +17,6 @@ class Layer(
layer = Layer(grokcore.json, allowTearDown=True)


checker = renormalizing.RENormalizing([
# Accommodate to exception wrapping in newer versions of mechanize
(re.compile(r'httperror_seek_wrapper:', re.M), 'HTTPError:'),
])


def http_call(app, method, path, data=None, handle_errors=False, **kw):
"""Function to help make RESTful calls.
Expand Down Expand Up @@ -62,7 +54,7 @@ def suiteFromPackage(name):
doctest.ELLIPSIS +
doctest.NORMALIZE_WHITESPACE +
doctest.REPORT_NDIFF +
renormalizing.IGNORE_EXCEPTION_MODULE_IN_PYTHON2)
doctest.IGNORE_EXCEPTION_DETAIL)
for filename in files:
if not filename.endswith('.py'):
continue
Expand All @@ -73,7 +65,6 @@ def suiteFromPackage(name):
layer_dir, name, filename[:-3])
test = doctest.DocTestSuite(
dottedname,
checker=checker,
extraglobs=globs,
optionflags=optionflags)
test.layer = layer
Expand Down

0 comments on commit 0667901

Please sign in to comment.