(self)
| 50 | assert out == [2, 3, 4] |
| 51 | |
| 52 | def test_subbuffer_deallocate(self): |
| 53 | with Context(LRU=0): |
| 54 | vbuf = self.buf.view(2, dtypes.uint8, offset=3).ensure_allocated() |
| 55 | self.buf.deallocate() |
| 56 | vbuf.deallocate() |
| 57 | |
| 58 | # Allocate a fake one on the same place |
| 59 | _ = Buffer(Device.DEFAULT, 10, dtypes.uint8).ensure_allocated() |
| 60 | |
| 61 | self.buf.ensure_allocated() |
| 62 | self.buf.copyin(memoryview(bytearray(range(10, 20)))) |
| 63 | |
| 64 | vbuf.ensure_allocated() |
| 65 | |
| 66 | tst = vbuf.as_memoryview().tolist() |
| 67 | assert tst == [13, 14] |
| 68 | |
| 69 | def test_subbuffer_is_allocated(self): |
| 70 | buf = self.buf_unalloc |
nothing calls this directly
no test coverage detected