def test_write_table_html_fill_values_optional_columns():
 buffer_output = StringIO()
 t = Table([[1], [1]], names=('a', 'b'))
 ascii.write(t, buffer_output, fill_values=('1', 'Hello world', 'b'), format='html')
 t_expected = Table([[1], ['Hello world']], names=('a', 'b'))
 buffer_expected = StringIO()
 ascii.write(t_expected, buffer_expected, format='html')
 assert (buffer_output.getvalue() == buffer_expected.getvalue())

def test_write_table_html_fill_values_optional_columns ( ) : buffer_output = StringIO ( ) t = Table ( [ [ 1 ] , [ 1 ] ] , names = ( 'a' , 'b' ) ) ascii . write ( t , buffer_output , fill_values = ( '1' , 'Hello world' , 'b' ) , format = 'html' ) t_expected = Table ( [ [ 1 ] , [ 'Hello world' ] ] , names = ( 'a' , 'b' ) ) buffer_expected = StringIO ( ) ascii . write ( t_expected , buffer_expected , format = 'html' ) assert ( buffer_output . getvalue ( ) == buffer_expected . getvalue ( ) )
test that passing optional column in fill_values should only replace matching columns .