summaryrefslogtreecommitdiff
path: root/debian/patches/noncopysend-test.patch
blob: 88e6893be3872b3880c49959b79a1e3a49ffeb35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: don't use uninitialized memory for test
 the memory could contain signalling NaN which crashes sparc python
Author: Julian Taylor <jtaylor.debian@googlemail.com>
Forwarded: not-needed

Index: pyzmq/zmq/tests/test_message.py
===================================================================
--- pyzmq.orig/zmq/tests/test_message.py
+++ pyzmq/zmq/tests/test_message.py
@@ -324,10 +324,8 @@ class TestFrame(BaseZMQTestCase):
         for i in range(1,len(shapes)+1):
             shape = shapes[:i]
             for dt in dtypes:
-                A = numpy.empty(shape, dtype=dt)
-                while numpy.isnan(A).any():
-                    # don't let nan sneak in
-                    A = numpy.ndarray(shape, dtype=dt)
+                A = numpy.random.uniform(-10000000,
+                                         1000000, size=shape).astype(dt)
                 a.send(A, copy=False)
                 msg = b.recv(copy=False)