Testcase for #411, cpdef temps.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 15 Oct 2009 08:42:28 +0000 (01:42 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 15 Oct 2009 08:42:28 +0000 (01:42 -0700)
tests/run/cpdef_temps_T411.pyx [new file with mode: 0644]

diff --git a/tests/run/cpdef_temps_T411.pyx b/tests/run/cpdef_temps_T411.pyx
new file mode 100644 (file)
index 0000000..aa1bc7d
--- /dev/null
@@ -0,0 +1,21 @@
+__doc__ = """
+    >>> A().is_True()
+    True
+    >>> A().is_False()
+    False
+
+    >>> B().is_True()
+    True
+    >>> B().is_False()
+    False
+"""
+
+cdef class A:
+    cpdef is_True(self):
+        return True
+    cpdef is_False(self):
+        return not self.is_True()
+
+class B(A):
+    def is_True(self):
+        return True