Commits

Anonymous committed 91ab382

Fix test_pickle().

Comments (0)

Files changed (1)

pypy/module/micronumpy/test/test_dtypes.py

         from numpypy import array, dtype
         from cPickle import loads, dumps
         a = array([1,2,3])
-        assert a.dtype.__reduce__() == (dtype, ('i8', 0, 1), (3, '<', None, None, None, -1, -1, 0))
+        if self.ptr_size == 8:
+            assert a.dtype.__reduce__() == (dtype, ('i8', 0, 1), (3, '<', None, None, None, -1, -1, 0))
+        else:
+            assert a.dtype.__reduce__() == (dtype, ('i4', 0, 1), (3, '<', None, None, None, -1, -1, 0))
         assert loads(dumps(a.dtype)) == a.dtype
 
     def test_pickle_record(self):