def test_guess_fail():
 with pytest.raises(ascii.InconsistentTableError) as err:
  ascii.read('asfdasdf\n1 2 3', format='basic')
 assert ('** To figure out why the table did not read, use guess=False and' in str(err.value))
 with pytest.raises(ValueError) as err:
  ascii.read('asfdasdf\n1 2 3', format='ipac')
 assert ('At least one header line beginning and ending with delimiter required' in str(err.value))
 with pytest.raises(ValueError) as err:
  ascii.read('asfdasdf\n1 2 3', format='basic', quotechar='"', delimiter=' ', fast_reader=False)
 assert ('Number of header columns (1) inconsistent with data columns (3)' in str(err.value))

def test_guess_fail ( ) : with pytest . raises ( ascii . InconsistentTableError ) as err : ascii . read ( 'asfdasdf\n1 2 3' , format = 'basic' ) assert ( '** To figure out why the table did not read, use guess=False and' in str ( err . value ) ) with pytest . raises ( ValueError ) as err : ascii . read ( 'asfdasdf\n1 2 3' , format = 'ipac' ) assert ( 'At least one header line beginning and ending with delimiter required' in str ( err . value ) ) with pytest . raises ( ValueError ) as err : ascii . read ( 'asfdasdf\n1 2 3' , format = 'basic' , quotechar = '"' , delimiter = ' ' , fast_reader = False ) assert ( 'Number of header columns (1) inconsistent with data columns (3)' in str ( err . value ) )
check the error message when guess fails .