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)
-- and got a "TypeError: set_trace requires at least one argument, 0 given".
Now, I know the "zpdb.set_trace()" does not want any arguments.
I moved the line from the doctest code into the failing infrastructure code --
same "TypeError".
I called "help(zpdb.set_trace)" and got:

Help on function set_trace in module zope.testing.doctest:


Apparently, "doctest" has overridden "zpdb.set_trace" in
an incompatible way....

I will rewrite my test as "unittest" and probably avoid in the future 
"zope.testing.doctest" whenever possible.

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to