@pytest.mark.parametrize('fast_writer', [True, False])
def test_write_quoted_empty_field(fast_writer):
 t = table.Table([['Hello', ''], ['', '']], dtype=['S10', 'S10'])
 out = StringIO()
 ascii.write(t, out, fast_writer=fast_writer)
 assert (out.getvalue().splitlines() == ['col0 col1', 'Hello ""', '"" ""'])
 out = StringIO()
 ascii.write(t, out, fast_writer=fast_writer, delimiter=',')
 assert (out.getvalue().splitlines() == ['col0,col1', 'Hello,', ','])

@ pytest . mark . parametrize ( 'fast_writer' , [ True , False ] ) def test_write_quoted_empty_field ( fast_writer ) : t = table . Table ( [ [ 'Hello' , '' ] , [ '' , '' ] ] , dtype = [ 'S10' , 'S10' ] ) out = StringIO ( ) ascii . write ( t , out , fast_writer = fast_writer ) assert ( out . getvalue ( ) . splitlines ( ) == [ 'col0 col1' , 'Hello ""' , '"" ""' ] ) out = StringIO ( ) ascii . write ( t , out , fast_writer = fast_writer , delimiter = ',' ) assert ( out . getvalue ( ) . splitlines ( ) == [ 'col0,col1' , 'Hello,' , ',' ] )
test the fix for #4350 where byte strings were output with a leading b on py3 .