[pypy-svn] r74931 - pypy/branch/blackhole-improvement/pypy/rpython/test

arigo at codespeak.net arigo at codespeak.net
Sun May 30 20:36:39 CEST 2010


Author: arigo
Date: Sun May 30 20:36:38 2010
New Revision: 74931

Modified:
   pypy/branch/blackhole-improvement/pypy/rpython/test/test_exception.py
Log:
This is the root of the failure of the previous checkin.
It should either work, or clearly complain that it's invalid
(and then we need another way to do that).


Modified: pypy/branch/blackhole-improvement/pypy/rpython/test/test_exception.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/rpython/test/test_exception.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/rpython/test/test_exception.py	Sun May 30 20:36:38 2010
@@ -125,7 +125,19 @@
 
 
 class TestLLtype(BaseTestException, LLRtypeMixin):
-    pass
+    def test_raise_ll_exception(self):
+        from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
+        def g():
+            e = OverflowError()
+            lle = cast_instance_to_base_ptr(e)
+            raise Exception, lle
+        def f():
+            try:
+                g()
+            except OverflowError:
+                return 42
+        res = self.interpret(f, [])
+        assert res == 42
 
 class TestOOtype(BaseTestException, OORtypeMixin):
     pass



More information about the Pypy-commit mailing list