def test_join_invalid(self): x = np.random.random((5, 13)) a = Table(x, { 'F': (3, 3), 'v': (3, ), 's': (1, ) }, ['random test data']) with pytest.raises(KeyError): a.join(a)
def test_join(self): x = np.random.random((5, 13)) a = Table(x, { 'F': (3, 3), 'v': (3, ), 's': (1, ) }, ['random test data']) y = np.random.random((5, 3)) b = Table(y, {'u': (3, )}, ['random test data']) a.join(b) assert np.array_equal(a.get('u'), b.get('u'))