Empty buffer can be sent and received through channel.
()
| 21 | |
| 22 | |
| 23 | def test_channel_send_empty_buffer() -> None: |
| 24 | """Empty buffer can be sent and received through channel.""" |
| 25 | c = chan(1) |
| 26 | buf = rt.asarray(np.array([], dtype=np.float64)) |
| 27 | c.send(buf) |
| 28 | received = c.recv() |
| 29 | assert len(received.numpy()) == 0 |
| 30 | |
| 31 | |
| 32 | def test_channel_capacity_1_fifo() -> None: |