Commit 71a575ad authored by Stefan H. Holek's avatar Stefan H. Holek

Increased frame depth to account for decorator.

parent b03c0a37
......@@ -194,6 +194,7 @@ def http(request_string, handle_errors=True):
return DocResponseWrapper(response, outstream, path, header_output)
def extractLayer(func):
def wrap(*args, **kw):
suite = func(*args, **kw)
......@@ -203,6 +204,7 @@ def extractLayer(func):
return suite
return wrap
class ZopeSuiteFactory:
def __init__(self, *args, **kw):
......@@ -306,26 +308,27 @@ class FunctionalSuiteFactory(ZopeSuiteFactory):
| doctest.REPORT_NDIFF
| doctest.NORMALIZE_WHITESPACE)
@extractLayer
def ZopeDocTestSuite(module=None, **kw):
module = doctest._normalize_module(module)
module = doctest._normalize_module(module, depth=3)
return ZopeSuiteFactory(module, **kw).doctestsuite()
@extractLayer
def ZopeDocFileSuite(*paths, **kw):
if kw.get('module_relative', True):
kw['package'] = doctest._normalize_module(kw.get('package'))
kw['package'] = doctest._normalize_module(kw.get('package'), depth=3)
return ZopeSuiteFactory(*paths, **kw).docfilesuite()
@extractLayer
def FunctionalDocTestSuite(module=None, **kw):
module = doctest._normalize_module(module)
module = doctest._normalize_module(module, depth=3)
return FunctionalSuiteFactory(module, **kw).doctestsuite()
@extractLayer
def FunctionalDocFileSuite(*paths, **kw):
if kw.get('module_relative', True):
kw['package'] = doctest._normalize_module(kw.get('package'))
kw['package'] = doctest._normalize_module(kw.get('package'), depth=3)
return FunctionalSuiteFactory(*paths, **kw).docfilesuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment