From: Stefan Behnel Date: Mon, 8 Nov 2010 08:06:33 +0000 (+0100) Subject: failing test for ticket #583 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c453885887ea8bc435927d5f366cc95b2c3a85d8;p=cython.git failing test for ticket #583 --- diff --git a/tests/bugs.txt b/tests/bugs.txt index d172b4c6..03245091 100644 --- a/tests/bugs.txt +++ b/tests/bugs.txt @@ -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 index 00000000..79d4af9e --- /dev/null +++ b/tests/run/pure_mode_cmethod_inheritance_T583.pxd @@ -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 index 00000000..44a88f19 --- /dev/null +++ b/tests/run/pure_mode_cmethod_inheritance_T583.py @@ -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"