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

Benji York benji at zope.com
Wed Dec 2 17:11:24 EST 2009


On Wed, Dec 2, 2009 at 5:06 PM, Marius Gedminas <marius at gedmin.as> 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 was envisioning using sys.settrace() to set a trace function that would
notice when the desired line of code is being executed and then trigger pdb.

I didn't plan on pdb doing the breakpoint handling itself.
-- 
Benji York


More information about the Zope-Dev mailing list