Example #1
0
 def test_append(self):
     x = np.random.random((5, 13))
     a = Table(x, {
         'F': (3, 3),
         'v': (3, ),
         's': (1, )
     }, ['random test data'])
     a.append(a)
     assert np.array_equal(a.data[:5].to_numpy(), a.data[5:].to_numpy())
Example #2
0
 def test_append_invalid(self):
     x = np.random.random((5, 13))
     a = Table(x, {
         'F': (3, 3),
         'v': (3, ),
         's': (1, )
     }, ['random test data'])
     b = Table(x, {
         'F': (3, 3),
         'u': (3, ),
         's': (1, )
     }, ['random test data'])
     with pytest.raises(KeyError):
         a.append(b)