[Zope-dev] [zope.testing.doctest] a nasty surprise
Dieter Maurer
dieter at handshake.de
Thu Apr 10 14:46:15 EDT 2008
Benji York wrote at 2008-4-10 11:50 -0400:
>Dieter Maurer wrote:
>> As the community (apparently) strongly favors "doctest" over
>> "unittest", I wrote my first test based on "zope.testing.doctest".
>> And promptly, I was badly surprised....
>>
>> In order to analyse a difficult problem, I added
>> "from dm.pdb import zpdb; zpdb.set_trace()" in the doctest
>> ("dm.pdb.zpdb" is my Zope aware PDB extension)
>
>The standard PDB works fine. I'm sure you're extended version can be
>tweaked to as well.
Does a documentation exist how "doctest" manipulates "set_trace"
and what it expects that the manipulation succeeds.
Apparently, "doctest" has replaced my "set_trace" in "zpdb"
by its non working implementation of "set_trace".
I can understand that my "set_trace" would not have worked
(as probably "sys.stdout/err" points somewhere else then usual),
but I have difficulties to understand why "doctest"'s "set_trace"
does not work (at all).
--
Dieter
More information about the Zope-Dev
mailing list