[python-arrayfire] 222/250: Fixing a test which was double freeing the data

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.

commit 3f7ddf94fef8659ad3a5d15dcf595d92a3f84d7d
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Mon Feb 22 16:36:58 2016 -0500

    Fixing a test which was double freeing the data
---
 tests/simple/device.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/simple/device.py b/tests/simple/device.py
index 98a2b71..3fe019c 100644
--- a/tests/simple/device.py
+++ b/tests/simple/device.py
@@ -46,7 +46,9 @@ def simple_device(verbose=False):
     print_func(dev_ptr)
     b = af.Array(src=dev_ptr, dims=a.dims(), dtype=a.dtype(), is_device=True)
     display_func(b)
-    af.lock_device_ptr(b)
-    af.unlock_device_ptr(b)
+
+    c = af.randu(10,10)
+    af.lock_device_ptr(c)
+    af.unlock_device_ptr(c)
 
 _util.tests['device'] = simple_device

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git



More information about the debian-science-commits mailing list