Show More
@@ -233,6 +233,23 class TestView(ClusterTestCase): | |||
|
233 | 233 | view.scatter('a', a) |
|
234 | 234 | b = view.gather('a', block=True) |
|
235 | 235 | assert_array_equal(b, a) |
|
236 | ||
|
237 | @skip_without('numpy') | |
|
238 | def test_push_numpy_nocopy(self): | |
|
239 | import numpy | |
|
240 | view = self.client[:] | |
|
241 | a = numpy.arange(64) | |
|
242 | view['A'] = a | |
|
243 | @interactive | |
|
244 | def check_writeable(x): | |
|
245 | return x.flags.writeable | |
|
246 | ||
|
247 | for flag in view.apply_sync(check_writeable, pmod.Reference('A')): | |
|
248 | self.assertFalse(flag, "array is writeable, push shouldn't have pickled it") | |
|
249 | ||
|
250 | view.push(dict(B=a)) | |
|
251 | for flag in view.apply_sync(check_writeable, pmod.Reference('B')): | |
|
252 | self.assertFalse(flag, "array is writeable, push shouldn't have pickled it") | |
|
236 | 253 | |
|
237 | 254 | def test_map(self): |
|
238 | 255 | view = self.client[:] |
General Comments 0
You need to be logged in to leave comments.
Login now