def test_multicolumn_table_html_fill_values():
 col1 = [1, 2, 3]
 col2 = [(1.0, 1.0), (2.0, 2.0), (3.0, 3.0)]
 col3 = [('a', 'a', 'a'), ('b', 'b', 'b'), ('c', 'c', 'c')]
 buffer_output = StringIO()
 t = Table([col1, col2, col3], names=('C1', 'C2', 'C3'))
 ascii.write(t, buffer_output, fill_values=('a', 'z'), format='html')
 col1 = [1, 2, 3]
 col2 = [(1.0, 1.0), (2.0, 2.0), (3.0, 3.0)]
 col3 = [('z', 'z', 'z'), ('b', 'b', 'b'), ('c', 'c', 'c')]
 buffer_expected = StringIO()
 t_expected = Table([col1, col2, col3], names=('C1', 'C2', 'C3'))
 ascii.write(t_expected, buffer_expected, format='html')
 assert (buffer_output.getvalue() == buffer_expected.getvalue())

def test_multicolumn_table_html_fill_values ( ) : col1 = [ 1 , 2 , 3 ] col2 = [ ( 1.0 , 1.0 ) , ( 2.0 , 2.0 ) , ( 3.0 , 3.0 ) ] col3 = [ ( 'a' , 'a' , 'a' ) , ( 'b' , 'b' , 'b' ) , ( 'c' , 'c' , 'c' ) ] buffer_output = StringIO ( ) t = Table ( [ col1 , col2 , col3 ] , names = ( 'C1' , 'C2' , 'C3' ) ) ascii . write ( t , buffer_output , fill_values = ( 'a' , 'z' ) , format = 'html' ) col1 = [ 1 , 2 , 3 ] col2 = [ ( 1.0 , 1.0 ) , ( 2.0 , 2.0 ) , ( 3.0 , 3.0 ) ] col3 = [ ( 'z' , 'z' , 'z' ) , ( 'b' , 'b' , 'b' ) , ( 'c' , 'c' , 'c' ) ] buffer_expected = StringIO ( ) t_expected = Table ( [ col1 , col2 , col3 ] , names = ( 'C1' , 'C2' , 'C3' ) ) ascii . write ( t_expected , buffer_expected , format = 'html' ) assert ( buffer_output . getvalue ( ) == buffer_expected . getvalue ( ) )
test to make sure that the html writer writes multidimensional columns with correctly replaced fill_values .