Skip to content

Instantly share code, notes, and snippets.

@temoto
Created August 26, 2012 14:10
Show Gist options
  • Save temoto/3479912 to your computer and use it in GitHub Desktop.
Save temoto/3479912 to your computer and use it in GitHub Desktop.
gevent reraise exception
import gevent
#...
def test_reraise_01():
try:
gevent.spawn(lambda: 1/0).join()
assert False, "ZeroDivisionError excepted"
except ZeroDivisionError:
pass
#...
@andreypopp
Copy link

assertRaises(ZeroDivisionError, gevent.spawn(lambda: 1/0).join)

@workingenius
Copy link

why ZeroDivisionError does not raised at line 6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment