[Zope3-checkins] SVN: Zope3/trunk/src/zope/testing/doctest.py Merged Tim's fix for pdb.set_trace support and removed my hack.

Jim Fulton jim at zope.com
Thu Nov 11 12:14:32 EST 2004


Log message for revision 28437:
  Merged Tim's fix for pdb.set_trace support and removed my hack. 
  Yay!
  

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-11 16:21:43 UTC (rev 28436)
+++ Zope3/trunk/src/zope/testing/doctest.py	2004-11-11 17:14:32 UTC (rev 28437)
@@ -350,9 +350,10 @@
         save_stdout = sys.stdout
         sys.stdout = self.__out
         # Call Pdb's trace dispatch method.
-        pdb.Pdb.trace_dispatch(self, *args)
+        result = pdb.Pdb.trace_dispatch(self, *args)
         # Restore stdout.
         sys.stdout = save_stdout
+        return result
 
 # [XX] Normalize with respect to os.path.pardir?
 def _module_relative_path(module, path):
@@ -1368,15 +1369,6 @@
         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