Commit 393f7201 authored by Tres Seaver's avatar Tres Seaver

Repaired 'handle_errors' usage for doctests, along with the supporting

'debug' argument passed to 'ZPublisher.Test.publish_module'.
parent 945a2e23
...@@ -31,6 +31,10 @@ Zope Changes ...@@ -31,6 +31,10 @@ Zope Changes
Bugs Fixed Bugs Fixed
- Repaired 'handle_errors' usage for doctests, along with the
supporting 'debug' argument passed to
'ZPublisher.Test.publish_module'.
- Collector #1879: applied patch by Dieter Maurer to fix a bug in - Collector #1879: applied patch by Dieter Maurer to fix a bug in
ac_aquire() ignoring the default argument ac_aquire() ignoring the default argument
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Support for (functional) doc tests """Support for (functional) doc tests
$Id: functional.py,v 1.2 2005/03/26 18:07:08 shh42 Exp $ $Id$
""" """
import sys, re, base64 import sys, re, base64
...@@ -176,7 +176,9 @@ def http(request_string, handle_errors=True): ...@@ -176,7 +176,9 @@ def http(request_string, handle_errors=True):
publish_module('Zope2', stdin=instream, publish_module('Zope2', stdin=instream,
response=response, response=response,
environ=env) environ=env,
debug=not handle_errors,
)
header_output.setResponseStatus(response.getStatus(), response.errmsg) header_output.setResponseStatus(response.getStatus(), response.errmsg)
header_output.setResponseHeaders(response.headers) header_output.setResponseHeaders(response.headers)
......
...@@ -199,6 +199,8 @@ def publish_module(module_name, ...@@ -199,6 +199,8 @@ def publish_module(module_name,
else: must_die=sys.exc_info() else: must_die=sys.exc_info()
response.exception(1, v) response.exception(1, v)
except: except:
if debug:
raise
response.exception() response.exception()
status=response.getStatus() status=response.getStatus()
if response: if response:
......
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