Add testcase for cimport+alias+subclass bug
authorMatěj Laitl <matej@laitl.cz>
Thu, 22 Aug 2013 15:55:07 +0000 (17:55 +0200)
committerMatěj Laitl <matej@laitl.cz>
Thu, 22 Aug 2013 22:46:18 +0000 (00:46 +0200)
The test may require moving into tests/compile after the bug is fixed.

tests/run/cimport_alias_subclass.pyx [new file with mode: 0644]
tests/run/cimport_alias_subclass_helper.pxd [new file with mode: 0644]

diff --git a/tests/run/cimport_alias_subclass.pyx b/tests/run/cimport_alias_subclass.pyx
new file mode 100644 (file)
index 0000000..afb30eb
--- /dev/null
@@ -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 (file)
index 0000000..4e5d168
--- /dev/null
@@ -0,0 +1,2 @@
+cdef class Base:
+    cdef bint foo(self)