@pytest.mark.parametrize('fast_writer', [True, False])
def test_commented_header_comments(fast_writer):
 t = table.Table([[1, 2]])
 with pytest.raises(ValueError) as err:
  out = StringIO()
  ascii.write(t, out, format='commented_header', comment=False, fast_writer=fast_writer)
 assert ('for the commented_header writer you must supply a string' in str(err.value))

@ pytest . mark . parametrize ( 'fast_writer' , [ True , False ] ) def test_commented_header_comments ( fast_writer ) : t = table . Table ( [ [ 1 , 2 ] ] ) with pytest . raises ( ValueError ) as err : out = StringIO ( ) ascii . write ( t , out , format = 'commented_header' , comment = False , fast_writer = fast_writer ) assert ( 'for the commented_header writer you must supply a string' in str ( err . value ) )
test the fix for #3562 with confusing exception using comment=false for the commented_header writer .