-
-
Notifications
You must be signed in to change notification settings - Fork 478
sys.excepthook is not called #535
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Originally reported by Andrew Hoos (Bitbucket: andrewhoos, GitHub: andrewhoos)
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.
#!python
import sys
def handle_exception(exc_type, exc_value, exc_traceback): # pragma: no cover
print('exception')
sys.excepthandler = handle_exception
raise RuntimeError('Raised')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working