예제 #1
0
파일: test_Table.py 프로젝트: hrh741/DAMASK
 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())
예제 #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)