On 23. 8. 2013 Matěj Laitl wrote:
> I'm attaching a more complete testcase which I'll also submit as a review
> request for convenience.

*cough*, really attaching the second time.

        Matěj
>From fd318ca5dc2418ebdbc704d9d10321390644ccf8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Laitl?= <ma...@laitl.cz>
Date: Thu, 22 Aug 2013 17:55:07 +0200
Subject: [PATCH] Add testcase for cimport+alias+subclass bug

The test may require moving into tests/compile after the bug is fixed.
---
 tests/run/cimport_alias_subclass.pyx        | 13 +++++++++++++
 tests/run/cimport_alias_subclass_helper.pxd |  2 ++
 2 files changed, 15 insertions(+)
 create mode 100644 tests/run/cimport_alias_subclass.pyx
 create mode 100644 tests/run/cimport_alias_subclass_helper.pxd

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)
-- 
1.8.1.5

_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to