Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1da7e7dd
Commit
1da7e7dd
authored
Sep 25, 2005
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward ported 'handle_errors' fix from 2.8 branch.
parent
de592be7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
doc/CHANGES.txt
doc/CHANGES.txt
+4
-0
lib/python/Testing/ZopeTestCase/functional.py
lib/python/Testing/ZopeTestCase/functional.py
+9
-2
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
+6
-3
lib/python/ZPublisher/Test.py
lib/python/ZPublisher/Test.py
+2
-0
No files found.
doc/CHANGES.txt
View file @
1da7e7dd
...
...
@@ -42,6 +42,10 @@ Zope Changes
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
ac_aquire() ignoring the default argument
...
...
lib/python/Testing/ZopeTestCase/functional.py
View file @
1da7e7dd
...
...
@@ -33,7 +33,8 @@ class Functional(sandbox.Sandboxed):
__implements__
=
(
interfaces
.
IFunctional
,)
def
publish
(
self
,
path
,
basic
=
None
,
env
=
None
,
extra
=
None
,
request_method
=
'GET'
,
stdin
=
None
):
def
publish
(
self
,
path
,
basic
=
None
,
env
=
None
,
extra
=
None
,
request_method
=
'GET'
,
stdin
=
None
,
handle_errors
=
True
):
'''Publishes the object at 'path' returning a response object.'''
from
StringIO
import
StringIO
...
...
@@ -77,7 +78,13 @@ class Functional(sandbox.Sandboxed):
outstream
=
StringIO
()
response
=
Response
(
stdout
=
outstream
,
stderr
=
sys
.
stderr
)
publish_module
(
'Zope2'
,
response
=
response
,
stdin
=
stdin
,
environ
=
env
,
extra
=
extra
)
publish_module
(
'Zope2'
,
response
=
response
,
stdin
=
stdin
,
environ
=
env
,
extra
=
extra
,
debug
=
not
handle_errors
,
)
# Restore security manager
setSecurityManager
(
sm
)
...
...
lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
View file @
1da7e7dd
...
...
@@ -12,7 +12,7 @@
##############################################################################
"""Support for (functional) doc tests
$Id
: functional.py,v 1.2 2005/03/26 18:07:08 shh42 Exp
$
$Id$
"""
import
sys
,
re
,
base64
...
...
@@ -174,9 +174,12 @@ def http(request_string, handle_errors=True):
outstream = StringIO()
response = Response(stdout=outstream, stderr=sys.stderr)
publish_module('
Zope2
',
stdin=instream,
publish_module('
Zope2
',
response=response,
environ=env)
stdin=instream,
environ=env,
debug=not handle_errors,
)
header_output.setResponseStatus(response.getStatus(), response.errmsg)
header_output.setResponseHeaders(response.headers)
...
...
lib/python/ZPublisher/Test.py
View file @
1da7e7dd
...
...
@@ -199,6 +199,8 @@ def publish_module(module_name,
else
:
must_die
=
sys
.
exc_info
()
response
.
exception
(
1
,
v
)
except
:
if
debug
:
raise
response
.
exception
()
status
=
response
.
getStatus
()
if
response
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment