Example #1
0
    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
Example #2
0
    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
Example #3
0
 def setup(self):
     self.filename = 'test.h5'
     self.items = Items(generate.items(10))
     self.h5file = h5py.File(self.filename)
Example #4
0
 def setup(self):
     self.filename = 'test.h5'
     self.group = h5py.File(self.filename, 'w').create_group('group')
     self.items = Items(generate.items(10))
Example #5
0
 def test_items(self):
     items = Items(generate.items(10))
     items.create_dataset(self.group, 0.1)
     assert self.group['items'].chunks == (5000,)
Example #6
0
 def setup(self):
     self.filename = 'test.h5'
     self.items = Items(generate.items(10))
     self.h5file = h5py.File(self.filename)
Example #7
0
 def setup(self):
     self.filename = 'test.h5'
     self.group = h5py.File(self.filename, 'w').create_group('group')
     self.items = Items(generate.items(10))
Example #8
0
 def test_items(self):
     items = Items(generate.items(10))
     items.create_dataset(self.group, 0.1)
     assert self.group['items'].chunks == (5000, )