diff options
Diffstat (limited to 'tests/isolated/hub_silent_exception.py')
| -rw-r--r-- | tests/isolated/hub_silent_exception.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/isolated/hub_silent_exception.py b/tests/isolated/hub_silent_exception.py new file mode 100644 index 0000000..c0d630a --- /dev/null +++ b/tests/isolated/hub_silent_exception.py @@ -0,0 +1,20 @@ +__test__ = False + + +class PleaseStopUsingExceptionsAsGoto(Exception): + pass + + +def fun(): + raise PleaseStopUsingExceptionsAsGoto() + + +if __name__ == '__main__': + import eventlet.debug + eventlet.debug.hub_exceptions(False) + t = eventlet.spawn(fun) + eventlet.sleep(0) + try: + t.wait() + except PleaseStopUsingExceptionsAsGoto: + print('pass') |
