[pypy-commit] pypy default: A failing test.

arigo noreply at buildbot.pypy.org
Sun Mar 4 21:47:40 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r53210:59d5a505c736
Date: 2012-03-04 21:47 +0100
http://bitbucket.org/pypy/pypy/changeset/59d5a505c736/

Log:	A failing test.

diff --git a/pypy/annotation/test/test_annrpython.py b/pypy/annotation/test/test_annrpython.py
--- a/pypy/annotation/test/test_annrpython.py
+++ b/pypy/annotation/test/test_annrpython.py
@@ -2431,6 +2431,28 @@
         assert isinstance(s.items[1], annmodel.SomeChar)
         assert isinstance(s.items[2], annmodel.SomeChar)
 
+    def test_multiple_mixins_mro(self):
+        # an obscure situation, but it occurred in module/micronumpy/types.py
+        class A(object):
+            _mixin_ = True
+            def foo(self): return 1
+        class B(A):
+            _mixin_ = True
+            def foo(self): return 2
+        class C(A):
+            _mixin_ = True
+        class D(B, C):
+            _mixin_ = True
+        class Concrete(D):
+            pass
+        def f():
+            return Concrete().foo()
+
+        assert f() == 2
+        a = self.RPythonAnnotator()
+        s = a.build_types(f, [])
+        assert s.const == 2
+
     def test___class___attribute(self):
         class Base(object): pass
         class A(Base): pass


More information about the pypy-commit mailing list