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

Method test_buffer_too_small

tables/tests/test_array.py:636–645  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

634 disk_array.read(0, self.size, 2, out_buffer_slice)
635
636 def test_buffer_too_small(self):
637 array, disk_array = self.create_array()
638 out_buffer = np.empty((self.size // 2,), "f8")
639 self.assertRaises(
640 ValueError, disk_array.read, 0, self.size, 1, out_buffer
641 )
642 try:
643 disk_array.read(0, self.size, 1, out_buffer)
644 except ValueError as exc:
645 self.assertIn("output array size invalid, got", str(exc))
646
647 def test_buffer_too_large(self):
648 array, disk_array = self.create_array()

Callers

nothing calls this directly

Calls 2

create_arrayMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected