On Wed, Dec 2, 2009 at 1:22 PM, Ross Patterson <m...@rpatterson.net> wrote:
> I'm sorry, I was unclear, the try/finally clauses are not necessarily in
> *test tearDown* methods (though I used that language), they are often a
> part of the application being tested, such as closing the request,
> closing DB connections, or aborting transactions.
In those situations I just edit the code and put a "import
pdb;pdb.set_trace()" at the top of the finally: block and re-run the
It is an interesting idea to provide some way to make that automatic.
Maybe a settrace hook that will invoke pdb at the top of every finally
clause that is encountered, somewhat similar to the -D option. You
might end up getting way too many false positives though.
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.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -