From f78e4cb82e8e8dd22cbaf3253112d37ac5ecdba1 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Tue, 29 Jul 2008 10:20:21 +0200 Subject: [PATCH] Buffer release test case --- tests/run/bufaccess.pyx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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): """ -- 2.26.2