[Zope3-checkins] CVS: Zope3 - test.py:1.80.2.2
Jim Fulton
jim at zope.com
Sun Feb 1 10:07:06 EST 2004
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv1347
Modified Files:
Tag: zope3-zodb3-devel-branch
test.py
Log Message:
Added a helper function, set_trace_doctest, installed in pdb that
allows us to use pdb from doctests or code called by doctests.
=== Zope3/test.py 1.80.2.1 => 1.80.2.2 ===
--- Zope3/test.py:1.80.2.1 Fri Jan 16 15:42:45 2004
+++ Zope3/test.py Sun Feb 1 10:07:05 2004
@@ -173,6 +173,13 @@
import unittest
import warnings
+def set_trace_doctest(stdin=sys.stdin, stdout=sys.stdout, trace=pdb.set_trace):
+ sys.stdin = stdin
+ sys.stdout = stdout
+ trace()
+
+pdb.set_trace_doctest = set_trace_doctest
+
from distutils.util import get_platform
PLAT_SPEC = "%s-%s" % (get_platform(), sys.version[0:3])
More information about the Zope3-Checkins
mailing list