failing test for ticket #583
authorStefan Behnel <scoder@users.berlios.de>
Mon, 8 Nov 2010 08:06:33 +0000 (09:06 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 8 Nov 2010 08:06:33 +0000 (09:06 +0100)
tests/bugs.txt
tests/run/pure_mode_cmethod_inheritance_T583.pxd [new file with mode: 0644]
tests/run/pure_mode_cmethod_inheritance_T583.py [new file with mode: 0644]

index d172b4c68354d741e6862df0de969853c8c81068..0324509181570523790df2e168f030e5975ae70b 100644 (file)
@@ -16,6 +16,7 @@ with_statement_module_level_T536
 function_as_method_T494
 closure_inside_cdef_T554
 ipow_crash_T562
+pure_mode_cmethod_inheritance_T583
 
 
 # CPython regression tests that don't current work:
diff --git a/tests/run/pure_mode_cmethod_inheritance_T583.pxd b/tests/run/pure_mode_cmethod_inheritance_T583.pxd
new file mode 100644 (file)
index 0000000..79d4af9
--- /dev/null
@@ -0,0 +1,5 @@
+cdef class Base:
+    cpdef str method(self)
+
+cdef class Derived(Base):
+    cpdef str method(self)
diff --git a/tests/run/pure_mode_cmethod_inheritance_T583.py b/tests/run/pure_mode_cmethod_inheritance_T583.py
new file mode 100644 (file)
index 0000000..44a88f1
--- /dev/null
@@ -0,0 +1,18 @@
+class Base(object):
+    '''
+    >>> base = Base()
+    >>> print(base.method())
+    Base
+    '''
+    def method(self):
+        return "Base"
+
+
+class Derived(Base):
+    '''
+    >>> derived = Derived()
+    >>> print(derived.method())
+    Derived
+    '''
+    def method(self):
+        return "Derived"