def testNotContiguous(self): sbuf = numpy.ones([3,2])[:,0] rbuf = numpy.zeros([3]) self.assertRaises( (BufferError, ValueError, TypeError), Sendrecv, sbuf, rbuf, )
def testNotWriteable(self): sbuf = numpy.ones([3]) rbuf = numpy.zeros([3]) rbuf.flags.writeable = False self.assertRaises( (BufferError, ValueError, TypeError), Sendrecv, sbuf, rbuf )
def testOrderFortran(self): sbuf = numpy.ones([3,2]).T rbuf = numpy.zeros([3,2]).T Sendrecv(sbuf, rbuf) self.assertTrue((sbuf == rbuf).all())
def testReadonly(self): sbuf = numpy.ones([3]) rbuf = numpy.zeros([3]) sbuf.flags.writeable = False Sendrecv(sbuf, rbuf) self.assertTrue((sbuf == rbuf).all())
def testOrderC(self): sbuf = numpy.ones([3,2]) rbuf = numpy.zeros([3,2]) Sendrecv(sbuf, rbuf) self.assertTrue((sbuf == rbuf).all())