summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bradshaw <robertwb@math.washington.edu>2008-10-30 00:56:21 -0700
committerRobert Bradshaw <robertwb@math.washington.edu>2008-10-30 00:56:21 -0700
commit9ca8c125c2e575a7d7cf1c22b5f909f322228468 (patch)
tree5422e56351694282ea35dfa02e6c192430fc8a7c
parent41ab9f0b7804b42d5e93408b6d6f25bec326819c (diff)
downloadcython-0.9.9.2.beta.tar.gz
Add corner case temp (de)allocation test.0.9.9.2.beta
This is as simple as I could get it.
-rw-r--r--tests/run/temps_corner1.pyx18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/run/temps_corner1.pyx b/tests/run/temps_corner1.pyx
new file mode 100644
index 000000000..bade96290
--- /dev/null
+++ b/tests/run/temps_corner1.pyx
@@ -0,0 +1,18 @@
+__doc__ = """
+ >>> B().coeffs_bitsize()
+ [2]
+"""
+
+cdef class A:
+ def numerator(self):
+ return self
+
+cdef int bitsize(A a):
+ return 1
+
+coeffs = [A()]
+
+class B:
+ def coeffs_bitsize(self):
+ r = [bitsize(c.numerator())+1 for c in coeffs]
+ return r