I guess I don't see how setting a custom sys.excepthook will help me in this case. I would like the exception that is raised to be recognized as a test failure. The best that I could do is add some sort of a hack that attempts to manually inject the error into the currently running test in a custom sys.excepthook. Are there any other potential methods of accomplishing this?<div>
<br></div><div>Thanks,</div><div>Aron<br><br><div class="gmail_quote">On Sun, Mar 13, 2011 at 5:15 AM, Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Sun, 6 Mar 2011 20:04:17 -0600, Aron Bierbaum <<a href="mailto:aronbierbaum@gmail.com">aronbierbaum@gmail.com</a>><br>
wrote:<br>
<div><div></div><div class="h5">> I have attached a sample test suite that shows an issue that we are<br>
running<br>
> into. The basic issue is that if an exception is raised in a method that<br>
is<br>
> connected to a Qt signal, the exception is only printed. I know that<br>
> translating the exception from Python to C++ and then back into Python<br>
is<br>
> difficult. But as the example shows the test suite can ignore real test<br>
> failures. Is there some way that PyQt could be changed to at least<br>
> translate<br>
> the exception type that can pass through C++ and back into Python?<br>
><br>
> Thanks,<br>
> Aron<br>
<br>
</div></div>The normal technique is to use sys.excepthook.<br>
<font color="#888888"><br>
Phil<br>
</font></blockquote></div><br></div>