[Zope3-checkins] SVN: Zope3/trunk/src/zope/testing/doctest.py
Switched to a less-elegent version of pdb.set_trace support to make
Jim Fulton
jim at zope.com
Mon Nov 8 13:59:13 EST 2004
Log message for revision 28406:
Switched to a less-elegent version of pdb.set_trace support to make
debugging work. :)
Changed:
U Zope3/trunk/src/zope/testing/doctest.py
-=-
Modified: Zope3/trunk/src/zope/testing/doctest.py
===================================================================
--- Zope3/trunk/src/zope/testing/doctest.py 2004-11-08 18:59:07 UTC (rev 28405)
+++ Zope3/trunk/src/zope/testing/doctest.py 2004-11-08 18:59:12 UTC (rev 28406)
@@ -1368,6 +1368,15 @@
self.debugger.reset()
pdb.set_trace = self.debugger.set_trace
+ # hack over Ed's more elegent set_trace with one that works. ;)
+ def set_trace():
+ sys.stdout = save_stdout
+ pdb.set_trace = real_pdb_set_trace
+ real_pdb_set_trace()
+
+ pdb.set_trace = set_trace
+
+
# Patch linecache.getlines, so we can see the example's source
# when we're inside the debugger.
self.save_linecache_getlines = linecache.getlines
More information about the Zope3-Checkins
mailing list