(self)
| 7 | @unittest.skipUnless(hasattr(Device[Device.DEFAULT].allocator, "_offset"), "subbuffer not supported") |
| 8 | class TestSubBuffer(unittest.TestCase): |
| 9 | def setUp(self): |
| 10 | self.buf = Buffer(Device.DEFAULT, 10, dtypes.uint8).ensure_allocated() |
| 11 | self.buf.copyin(memoryview(bytearray(range(10)))) |
| 12 | self.buf_unalloc = Buffer(Device.DEFAULT, 10, dtypes.uint8) |
| 13 | |
| 14 | def test_subbuffer(self): |
| 15 | vbuf = self.buf.view(2, dtypes.uint8, offset=3).ensure_allocated() |
nothing calls this directly
no test coverage detected