This file does not call the handle_exception function when it is run through coverage, but it does when called through python. The global exception provides significant functionality that would be great to test. But I can't test with coverage because it disables the exception handler which changes the results of the test in question.
Hmm, interesting. Technically, coverage.py doesn't disable the exception handler, but it does catch all the exceptions at the top of the stack. I guess coverage/execfile.py needs to invoke the excepthook explicitly?