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.
import sys def handle_exception(exc_type, exc_value, exc_traceback): # pragma: no cover print('exception') sys.excepthandler = handle_exception raise RuntimeError('Raised')