From 84af43affc1a257fd14a73ea101d7ef362237455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Fri, 11 Aug 2017 10:15:26 +0200 Subject: fix unit test Gbp-Pq: Name 0003-fix-unit-test.patch --- silx/opencl/common.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'silx/opencl/common.py') diff --git a/silx/opencl/common.py b/silx/opencl/common.py index e955f46..07159e2 100644 --- a/silx/opencl/common.py +++ b/silx/opencl/common.py @@ -61,7 +61,14 @@ else: pyopencl = None else: import pyopencl.array as array - mf = pyopencl.mem_flags + +if pyopencl is None: + class mf(object): + WRITE_ONLY = 1 + READ_ONLY = 1 + READ_WRITE = 1 +else: + mf = pyopencl.mem_flags if pyopencl is None: # Define default mem flags -- cgit v1.2.3