[pypy-svn] r15472 - pypy/dist/pypy/rpython/test

cfbolz at codespeak.net cfbolz at codespeak.net
Sun Jul 31 15:27:17 CEST 2005


Author: cfbolz
Date: Sun Jul 31 15:27:16 2005
New Revision: 15472

Modified:
   pypy/dist/pypy/rpython/test/test_rpbc.py
Log:
(pedronis, cfbolz):
added a skipped test which shows the problem of our current handling of
exceptions in the RTyper.


Modified: pypy/dist/pypy/rpython/test/test_rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rpbc.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rpbc.py	Sun Jul 31 15:27:16 2005
@@ -789,3 +789,42 @@
     res = interpret(f, [1])
     assert res == 3*2+11*7
     
+
+def test_mulitple_ll_one_hl_op():
+    class E(Exception):
+        pass
+    class A(object):
+        pass
+    class B(A):
+        pass
+    class C(object):
+        def method(self, x):
+            if x:
+                raise E()
+            else:
+                return A()
+    class D(C):
+        def method(self, x):
+            if x:
+                raise E()
+            else:
+                return B()
+    def call(x):
+        c = D()
+        c.method(x)
+        try:
+            c.method(x + 1)
+        except E:
+            pass
+        c = C()
+        c.method(x)
+        try:
+            return c.method(x + 1)
+        except E:
+            return None
+    try:
+        res = interpret(call, [0])
+    except:
+        py.test.skip("this test shows the problem with rtyping exceptions")
+
+    



More information about the Pypy-commit mailing list