Message49486
Zope version of doctest is patched for coverage testing, get:
http://svn.zope.org/zope.testing/trunk/src/zope/testing/doctest.py
The patch to fix Python 2.4 doctest.py:
--- doctest.py.orig 2007-02-27 02:32:05.000000000 +0100
+++ doctest.py 2007-02-27 02:36:31.000000000 +0100
@@ -340,8 +340,19 @@
"""
def __init__(self, out):
self.__out = out
+ self.__debugger_used = False
pdb.Pdb.__init__(self)
+ def set_trace(self):
+ self.__debugger_used = True
+ pdb.Pdb.set_trace(self)
+
+ def set_continue(self):
+ # Calling set_continue unconditionally would break unit test coverage
+ # reporting, as Bdb.set_continue calls sys.settrace(None).
+ if self.__debugger_used:
+ pdb.Pdb.set_continue(self)
+
def trace_dispatch(self, *args):
# Redirect stdout to the given stream.
save_stdout = sys.stdout |
|
Date |
User |
Action |
Args |
2007-08-23 15:45:45 | admin | link | issue1429818 messages |
2007-08-23 15:45:45 | admin | create | |
|