@pytest.mark.skipif('not HAS_YAML')
def test_bad_delimiter():
 out = StringIO()
 with pytest.raises(ValueError) as err:
  T_DTYPES.write(out, format='ascii.ecsv', delimiter='|')
 assert ('only space and comma are allowed' in str(err.value))

@ pytest . mark . skipif ( 'not HAS_YAML' ) def test_bad_delimiter ( ) : out = StringIO ( ) with pytest . raises ( ValueError ) as err : T_DTYPES . write ( out , format = 'ascii.ecsv' , delimiter = '|' ) assert ( 'only space and comma are allowed' in str ( err . value ) )
passing a delimiter other than space or comma gives an exception .