[Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

Marius Gedminas marius at gedmin.as
Thu Dec 3 08:51:06 EST 2009


On Thu, Dec 03, 2009 at 08:55:32AM +0100, Wichert Akkerman wrote:
> On 2009-12-2 23:06, Marius Gedminas wrote:
> > On Wed, Dec 02, 2009 at 01:36:37PM -0500, Benji York wrote:
> >> Here's another idea: a testrunner option that takes a file name and line
> >> number and inserts a breakpoint at that position.  That way you can get
> >> the same effect as editing the code without actually having to do so.
> >
> > Is that possible?  I once spent hours studying pdb docs and found no way
> > to set a breakpoint in advance, without modifying the source file in
> > question, and without having the user to do manual interaction at the
> > beginning.
> 
> I think mr.freeze (see http://pypi.python.org/pypi/mr.freeze ) can do 
> this.

Thank you for the link, this looks very interesting.

> Perhaps there is some code there you could borrow.

Or just depend and invoke it.  AFAICS mr.freeze subclasses Pdb and
rewires some of its internals in a nontrivial fashion to be able to do that:
http://dev.plone.org/collective/browser/mr.freeze/trunk/mr/freeze/freeze.py

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20091203/7bfba183/attachment.bin 


More information about the Zope-Dev mailing list