##// END OF EJS Templates
add failing test for push/pull recarrays
MinRK -
Show More
@@ -275,6 +275,30 b' class TestView(ClusterTestCase, ParametricTestCase):'
275 C = view.apply_sync(lambda x:x, B)
275 C = view.apply_sync(lambda x:x, B)
276 assert_array_equal(B,C)
276 assert_array_equal(B,C)
277
277
278 @skip_without('numpy')
279 def test_push_pull_recarray(self):
280 """push/pull recarrays"""
281 import numpy
282 from numpy.testing.utils import assert_array_equal
283
284 view = self.client[-1]
285
286 R = numpy.array([
287 (1, 'hi', 0.),
288 (2**30, 'there', 2.5),
289 (-99999, 'world', -12345.6789),
290 ], [('n', int), ('s', str), ('f', float)])
291
292 view['RR'] = R
293 R2 = view['RR']
294
295 r_dtype, r_shape = view.apply_sync(interactive(lambda : (RR.dtype, RR.shape)))
296 self.assertEquals(r_dtype, R.dtype)
297 self.assertEquals(r_shape, R.shape)
298 self.assertEquals(R2.dtype, R.dtype)
299 self.assertEquals(R2.shape, R.shape)
300 assert_array_equal(R2, R)
301
278 def test_map(self):
302 def test_map(self):
279 view = self.client[:]
303 view = self.client[:]
280 def f(x):
304 def f(x):
General Comments 0
You need to be logged in to leave comments. Login now