Beispiel #1
0
    def test_appendable(self):
        t = Times(generate.times(5, tformat=1))
        assert t.is_appendable_to(self.group)

        t = Times(generate.times(5, 12, tformat=1))
        assert t.is_appendable_to(self.group)

        t = Times(generate.times(10, 1, tformat=2))
        assert t.is_appendable_to(self.group)

        t = Times2D(generate.times(5, 1, tformat=2))
        assert not t.is_appendable_to(self.group)

        t = Times2D(generate.times(10, 1, tformat=2))
        assert not t.is_appendable_to(self.group)
Beispiel #2
0
 def setup(self):
     self.filename = 'test.h5'
     self.group = h5py.File(self.filename).create_group('group')
     self.data = generate.times(10,20,2)
Beispiel #3
0
 def setup(self):
     self.t1 = generate.times(10, tformat=1)
     self.t2 = generate.times(10, tformat=2)
Beispiel #4
0
 def test_init(self):
     assert_raise(Times2D, generate.times(10), 'must be 2D')
     assert Times2D(self.data).tformat == 2