[pypy-commit] pypy stacklet: Another similar test.

arigo noreply at buildbot.pypy.org
Sat Aug 6 12:31:17 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
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()


More information about the pypy-commit mailing list