(self)
| 814 | # send_buffer |
| 815 | |
| 816 | def test_send_buffer(self): |
| 817 | buf = bytearray(b'spamspamspam') |
| 818 | cid = _channels.create(REPLACE) |
| 819 | _channels.send_buffer(cid, buf, blocking=False) |
| 820 | obj = recv_nowait(cid) |
| 821 | |
| 822 | self.assertIsNot(obj, buf) |
| 823 | self.assertIsInstance(obj, memoryview) |
| 824 | self.assertEqual(obj, buf) |
| 825 | |
| 826 | buf[4:8] = b'eggs' |
| 827 | self.assertEqual(obj, buf) |
| 828 | obj[4:8] = b'ham.' |
| 829 | self.assertEqual(obj, buf) |
| 830 | |
| 831 | #------------------- |
| 832 | # send with waiting |
nothing calls this directly
no test coverage detected