From 9ca8c125c2e575a7d7cf1c22b5f909f322228468 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 30 Oct 2008 00:56:21 -0700 Subject: [PATCH] Add corner case temp (de)allocation test. This is as simple as I could get it. --- tests/run/temps_corner1.pyx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/run/temps_corner1.pyx diff --git a/tests/run/temps_corner1.pyx b/tests/run/temps_corner1.pyx new file mode 100644 index 00000000..bade9629 --- /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 -- 2.26.2