From: Dag Sverre Seljebotn Date: Tue, 29 Jul 2008 08:20:21 +0000 (+0200) Subject: Buffer release test case X-Git-Tag: 0.9.8.1~49^2~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f78e4cb82e8e8dd22cbaf3253112d37ac5ecdba1;p=cython.git Buffer release test case --- diff --git a/tests/run/bufaccess.pyx b/tests/run/bufaccess.pyx index a82271e6..dc830277 100755 --- a/tests/run/bufaccess.pyx +++ b/tests/run/bufaccess.pyx @@ -29,6 +29,11 @@ def testcase(func): def testcas(a): pass + +# +# Buffer acquire and release tests +# + @testcase def acquire_release(o1, o2): """ @@ -289,7 +294,22 @@ def tuple_buffer_assignment2(tup): """ cdef object[int] x, y x, y = tup - + +@testcase +def explicitly_release_buffer(): + """ + >>> explicitly_release_buffer() + acquired A + released A + After release + """ + cdef object[int] x = IntMockBuffer("A", range(10)) + x = None + print "After release" + +# +# Index bounds checking +# @testcase def get_int_2d(object[int, 2] buf, int i, int j): """