def test_append(self): self.items.create_dataset(self.group, 10) writed = self.group['items'] assert len(writed[...]) == 0 self.items.write_to(self.group) assert len(writed[...]) == 10 self.items.write_to(self.group) assert len(writed[...]) == 20 items2 = Items(generate.items(5)) items2.write_to(self.group) assert len(writed[...]) == 25 del self.group['items'] self.items.create_dataset(self.group, 10) assert len(self.group['items'][...]) == 0
def setup(self): self.filename = 'test.h5' self.items = Items(generate.items(10)) self.h5file = h5py.File(self.filename)
def setup(self): self.filename = 'test.h5' self.group = h5py.File(self.filename, 'w').create_group('group') self.items = Items(generate.items(10))
def test_items(self): items = Items(generate.items(10)) items.create_dataset(self.group, 0.1) assert self.group['items'].chunks == (5000,)
def test_items(self): items = Items(generate.items(10)) items.create_dataset(self.group, 0.1) assert self.group['items'].chunks == (5000, )