Author: Armin Rigo <[email protected]>
Branch: stacklet
Changeset: r46311:434032bc1daf
Date: 2011-08-06 11:35 +0200
http://bitbucket.org/pypy/pypy/changeset/434032bc1daf/
Log: Another similar test.
diff --git a/pypy/module/_stacklet/test/test_stacklet.py
b/pypy/module/_stacklet/test/test_stacklet.py
--- a/pypy/module/_stacklet/test/test_stacklet.py
+++ b/pypy/module/_stacklet/test/test_stacklet.py
@@ -30,3 +30,16 @@
raises(TypeError, newstacklet, empty_callback)
assert len(seen) == 1
assert not seen[0].is_pending()
+
+ def test_propagate_exception(self):
+ from _stacklet import error, newstacklet
+ #
+ def empty_callback(h):
+ assert h.is_pending()
+ seen.append(h)
+ raise ValueError
+ #
+ seen = []
+ raises(ValueError, newstacklet, empty_callback)
+ assert len(seen) == 1
+ assert not seen[0].is_pending()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit