summaryrefslogtreecommitdiff
path: root/debian/patches/0003-fix-unit-test.patch
blob: 4e4f77f110f460eb205a6954458b4d69be4d2f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
 <picca@synchrotron-soleil.fr>
Date: Fri, 11 Aug 2017 10:15:26 +0200
Subject: fix unit test

---
 silx/opencl/common.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/silx/opencl/common.py b/silx/opencl/common.py
index 8d31c8a..1f9df50 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