Comment 8 for bug 881778

Revision history for this message
Jonathan Lange (jml) wrote :

Have just tried to fix this bug. I've come up with a branch that doesn't change the behaviour much but improves the code factoring a little.

The stack hiding controls in trunk mostly work, except that FullStackRunTest has a bug that causes any error in the test to not be caught. My branch fixes that. In particular, hide_testtools_stack() works the same in both trunk and my branch, and works "correctly".

The reason for the discrepancy between the pdb stack and the exception error message stack is unknown to me. I can confirm that this difference is also apparent in traceback.print_exc vs traceback.print_stack. Code http://paste.ubuntu.com/828997/, and output: http://paste.ubuntu.com/829001/ that demonstrate the difference.

I think the exc_info traceback stops (or starts, depending on your perspective) at the frame where the exception is caught.

Showing the full stack, as pdb or print_stack do, ranks as a feature request.