This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients
Date 2007-02-27.01:45:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 15:45:45adminlinkissue1429818 messages
2007-08-23 15:45:45admincreate