From: Matěj Laitl Date: Thu, 22 Aug 2013 15:55:07 +0000 (+0200) Subject: Add testcase for cimport+alias+subclass bug X-Git-Tag: 0.20b1~284^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd318ca5dc2418ebdbc704d9d10321390644ccf8;p=platform%2Fupstream%2Fpython-cython.git Add testcase for cimport+alias+subclass bug The test may require moving into tests/compile after the bug is fixed. --- diff --git a/tests/run/cimport_alias_subclass.pyx b/tests/run/cimport_alias_subclass.pyx new file mode 100644 index 0000000..afb30eb --- /dev/null +++ b/tests/run/cimport_alias_subclass.pyx @@ -0,0 +1,13 @@ +cimport cimport_alias_subclass_helper as cash + +cdef class Derived(cash.Base): + cdef bint foo(self): + print "Hello" + +def run(): + """ + >>> run() + Hello + """ + d = Derived() + d.foo() diff --git a/tests/run/cimport_alias_subclass_helper.pxd b/tests/run/cimport_alias_subclass_helper.pxd new file mode 100644 index 0000000..4e5d168 --- /dev/null +++ b/tests/run/cimport_alias_subclass_helper.pxd @@ -0,0 +1,2 @@ +cdef class Base: + cdef bint foo(self)