'check for clobbering message buffers'

def test_noncopying_recv(self):

    null = ('\x00' * 64)
    (sa, sb) = self.create_bound_pair(zmq.PAIR, zmq.PAIR)
    for i in range(32):
        sb.send(null, copy=False)
        m = sa.recv(copy=False)
        mb = m.bytes
        buf = m.buffer
        del m
        for i in range(5):
            ff = ('\xff' * (40 + (i * 10)))
            sb.send(ff, copy=False)
            m2 = sa.recv(copy=False)
            if (view.__name__ == 'buffer'):
                b = bytes(buf)
            else:
                b = buf.tobytes()
            self.assertEqual(b, null)
            self.assertEqual(mb, null)
            self.assertEqual(m2.bytes, ff)
