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

antocuni at codespeak.net antocuni at codespeak.net
Sat Jun 3 12:49:21 CEST 2006


Author: antocuni
Date: Sat Jun  3 12:49:20 2006
New Revision: 28148

Modified:
   pypy/dist/pypy/rpython/test/test_rpbc.py
Log:
(antocuni, nik)

Added a failing test.



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	Sat Jun  3 12:49:20 2006
@@ -25,6 +25,9 @@
         MyBaseWithInit.__init__(self, a)
         self.b1 = b
 
+class MySubclassWithoutInit(MyBaseWithInit):
+    pass
+
 class Freezing:
     def _freeze_(self):
         return True
@@ -128,6 +131,12 @@
             return instance.a1 * instance.b1
         assert self.interpret(f, [6, 7]) == 42
 
+    def test_class_init_inherited(self):
+        self._skip_oo('inherited __init__')
+        def f(a):
+            instance = MySubclassWithoutInit(a)
+            return instance.a1
+        assert self.interpret(f, [42]) == 42
 
     def test_freezing(self):
         fr1 = Freezing()



More information about the Pypy-commit mailing list