@pytest.mark.parametrize('fast_writer', [True, False])
def test_strip_names(fast_writer):
 data = table.Table([[1], [2], [3]], names=(' A', 'B ', ' C '))
 out = StringIO()
 ascii.write(data, out, format='csv', fast_writer=fast_writer)
 assert (out.getvalue().splitlines()[0] == 'A,B,C')

@ pytest . mark . parametrize ( 'fast_writer' , [ True , False ] ) def test_strip_names ( fast_writer ) : data = table . Table ( [ [ 1 ] , [ 2 ] , [ 3 ] ] , names = ( ' A' , 'B ' , ' C ' ) ) out = StringIO ( ) ascii . write ( data , out , format = 'csv' , fast_writer = fast_writer ) assert ( out . getvalue ( ) . splitlines ( ) [ 0 ] == 'A,B,C' )
names should be stripped of whitespace by default .