From c453885887ea8bc435927d5f366cc95b2c3a85d8 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 8 Nov 2010 09:06:33 +0100 Subject: [PATCH] failing test for ticket #583 --- tests/bugs.txt | 1 + .../run/pure_mode_cmethod_inheritance_T583.pxd | 5 +++++ .../run/pure_mode_cmethod_inheritance_T583.py | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 tests/run/pure_mode_cmethod_inheritance_T583.pxd create mode 100644 tests/run/pure_mode_cmethod_inheritance_T583.py 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" -- 2.26.2