@pytest.mark.skipif('not HAS_BEAUTIFUL_SOUP')
def test_no_names():
 table_in = ['<table>', '<tr><td>1</td></tr>', '<tr><td>2</td></tr>', '</table>']
 dat = Table.read(table_in, format='ascii.html')
 assert (dat.colnames == ['col1'])
 assert (len(dat) == 2)
 dat = Table.read(table_in, format='ascii.html', names=['a'])
 assert (dat.colnames == ['a'])
 assert (len(dat) == 2)

@ pytest . mark . skipif ( 'not HAS_BEAUTIFUL_SOUP' ) def test_no_names ( ) : table_in = [ '<table>' , '<tr><td>1</td></tr>' , '<tr><td>2</td></tr>' , '</table>' ] dat = Table . read ( table_in , format = 'ascii.html' ) assert ( dat . colnames == [ 'col1' ] ) assert ( len ( dat ) == 2 ) dat = Table . read ( table_in , format = 'ascii.html' , names = [ 'a' ] ) assert ( dat . colnames == [ 'a' ] ) assert ( len ( dat ) == 2 )
test reading a table witn no column header .