def test_column_conversion_error():
 ipac = '| col0   |\n| double |\n 1  2\n'
 with pytest.raises(ValueError) as err:
  ascii.read(ipac, guess=False, format='ipac')
 assert ('Column col0 failed to convert:' in str(err.value))
 with pytest.raises(ValueError) as err:
  ascii.read(['a b', '1 2'], guess=False, format='basic', converters={'a': []})
 assert ('no converters' in str(err.value))

def test_column_conversion_error ( ) : ipac = '| col0   |\n| double |\n 1  2\n' with pytest . raises ( ValueError ) as err : ascii . read ( ipac , guess = False , format = 'ipac' ) assert ( 'Column col0 failed to convert:' in str ( err . value ) ) with pytest . raises ( ValueError ) as err : ascii . read ( [ 'a b' , '1 2' ] , guess = False , format = 'basic' , converters = { 'a' : [ ] } ) assert ( 'no converters' in str ( err . value ) )
test that context information from column conversion error is provided .