def test_group_by_errors(T1):
 with pytest.raises(ValueError):
  T1.group_by('f')
 with pytest.raises(ValueError):
  T1.group_by(['f', 'g'])
 with pytest.raises(ValueError):
  T1.group_by(np.array([1, 2]))
 with pytest.raises(TypeError):
  T1.group_by(None)
 t1 = Table(T1, masked=True)
 t1['a'].mask[4] = True
 with pytest.raises(ValueError):
  t1.group_by('a')

def test_group_by_errors ( T1 ) : with pytest . raises ( ValueError ) : T1 . group_by ( 'f' ) with pytest . raises ( ValueError ) : T1 . group_by ( [ 'f' , 'g' ] ) with pytest . raises ( ValueError ) : T1 . group_by ( np . array ( [ 1 , 2 ] ) ) with pytest . raises ( TypeError ) : T1 . group_by ( None ) t1 = Table ( T1 , masked = True ) t1 [ 'a' ] . mask [ 4 ] = True with pytest . raises ( ValueError ) : t1 . group_by ( 'a' )
appropriate errors get raised .