[Python-checkins] python/dist/src/Lib doctest.py,1.117,1.118
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Mon Nov 8 23:08:16 CET 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12102/Lib
Modified Files:
doctest.py
Log Message:
test_doctest.py test_pdb_set_trace_nested(): A new test from Jim Fulton
showing that doctest's pdb.set_trace() support was dramatically broken.
doctest.py _OutputRedirectingPdb.trace_dispatch(): Return a local trace
function instead of (implicitly) None. Else interaction with pdb was
bizarre, noticing only 'call' events. Amazingly, the existing set_trace()
tests didn't care.
Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- doctest.py 13 Oct 2004 14:15:31 -0000 1.117
+++ doctest.py 8 Nov 2004 22:07:35 -0000 1.118
@@ -105,8 +105,6 @@
warnings.filterwarnings("ignore", "is_private", DeprecationWarning,
__name__, 0)
-real_pdb_set_trace = pdb.set_trace
-
# There are 4 basic classes:
# - Example: a <source, want> pair, plus an intra-docstring line number.
# - DocTest: a collection of examples, parsed from a docstring, plus
@@ -350,9 +348,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):
More information about the Python-checkins
mailing list