Author: Armin Rigo <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to