[pypy-commit] pypy default: Add another test, which I'm unable to fix either

arigo noreply at buildbot.pypy.org
Thu Jul 30 11:57:14 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r78717:dfe31a786086
Date: 2015-07-30 11:57 +0200
http://bitbucket.org/pypy/pypy/changeset/dfe31a786086/

Log:	Add another test, which I'm unable to fix either

diff --git a/rpython/annotator/test/test_annrpython.py b/rpython/annotator/test/test_annrpython.py
--- a/rpython/annotator/test/test_annrpython.py
+++ b/rpython/annotator/test/test_annrpython.py
@@ -4433,8 +4433,8 @@
         with py.test.raises(annmodel.UnionError) as exc:
             a.build_types(f2, [int])
 
-    @py.test.mark.xfail("'__pypy__' in sys.modules")
     def test_property_union_2(self):
+        py.test.xfail("FIX ME")
         class Base(object):
             pass
 
@@ -4458,8 +4458,28 @@
             return obj.x
         a = self.RPythonAnnotator()
         # Ideally, this should translate to something sensible,
-        # but for now, UnionError is better than silently mistranslating.
-        with py.test.raises(annmodel.UnionError):
+        # but for now, AnnotatorError is better than silently mistranslating.
+        with py.test.raises(annmodel.AnnotatorError):
+            a.build_types(f, [int])
+
+    def test_property_union_3(self):
+        py.test.xfail("FIX ME")
+        class Base(object):
+            pass
+        class A(Base):
+            @property
+            def x(self):
+                return 42
+        class B(Base):
+            x = 43
+        def f(n):
+            if n < 0:
+                obj = A()
+            else:
+                obj = B()
+            return obj.x
+        a = self.RPythonAnnotator()
+        with py.test.raises(annmodel.AnnotatorError):
             a.build_types(f, [int])
 
 


More information about the pypy-commit mailing list