[pypy-commit] pypy stacklet: Test for the app-level type of Stacklet.

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


Author: Armin Rigo <arigo at tunes.org>
Branch: stacklet
Changeset: r46313:15d4c6413555
Date: 2011-08-06 11:39 +0200
http://bitbucket.org/pypy/pypy/changeset/15d4c6413555/

Log:	Test for the app-level type of Stacklet.

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
@@ -61,3 +61,15 @@
         assert not seen[0].is_pending()
         assert seen[1] == (42, 43)
         assert seen[2] == {'foo': 44, 'bar': 45}
+
+    def test_type_of_h(self):
+        from _stacklet import newstacklet, Stacklet
+        #
+        def empty_callback(h):
+            seen.append(type(h))
+            return h
+        #
+        seen = []
+        h = newstacklet(empty_callback)
+        assert h is None
+        assert seen[0] is Stacklet


More information about the pypy-commit mailing list