def test_io_write_fail(mixin_cols):
 t = QTable(mixin_cols)
 for fmt in ('fits', 'votable', 'hdf5'):
  if ((fmt == 'hdf5') and (not HAS_H5PY)):
   continue
  out = StringIO()
  with pytest.raises(ValueError) as err:
   t.write(out, format=fmt)
  assert ('cannot write table with mixin column(s)' in str(err.value))

def test_io_write_fail ( mixin_cols ) : t = QTable ( mixin_cols ) for fmt in ( 'fits' , 'votable' , 'hdf5' ) : if ( ( fmt == 'hdf5' ) and ( not HAS_H5PY ) ) : continue out = StringIO ( ) with pytest . raises ( ValueError ) as err : t . write ( out , format = fmt ) assert ( 'cannot write table with mixin column(s)' in str ( err . value ) )
test that table with mixin column cannot be written by io .