MCPcopy Create free account
hub / github.com/PyTables/PyTables / test_buffer_too_small

Method test_buffer_too_small

tables/tests/test_carray.py:1346–1355  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1344 disk_array.read(0, self.size, 2, out_buffer_slice)
1345
1346 def test_buffer_too_small(self):
1347 array, disk_array = self.create_array()
1348 out_buffer = np.empty((self.size // 2,), "i8")
1349 self.assertRaises(
1350 ValueError, disk_array.read, 0, self.size, 1, out_buffer
1351 )
1352 try:
1353 disk_array.read(0, self.size, 1, out_buffer)
1354 except ValueError as exc:
1355 self.assertIn("output array size invalid, got", str(exc))
1356
1357
1358class SizeOnDiskInMemoryPropertyTestCase(

Callers

nothing calls this directly

Calls 2

create_arrayMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected