@pytest.mark.skipif('not HAS_BEAUTIFUL_SOUP')
def test_missing_data():
 table_in = ['<table>', '<tr><th>A</th></tr>', '<tr><td></td></tr>', '<tr><td>1</td></tr>', '</table>']
 dat = Table.read(table_in, format='ascii.html')
 assert (dat.masked is True)
 assert np.all((dat['A'].mask == [True, False]))
 assert (dat['A'].dtype.kind == 'i')
 table_in = ['<table>', '<tr><th>A</th></tr>', '<tr><td>...</td></tr>', '<tr><td>1</td></tr>', '</table>']
 dat = Table.read(table_in, format='ascii.html', fill_values=[('...', '0')])
 assert (dat.masked is True)
 assert np.all((dat['A'].mask == [True, False]))
 assert (dat['A'].dtype.kind == 'i')

@ pytest . mark . skipif ( 'not HAS_BEAUTIFUL_SOUP' ) def test_missing_data ( ) : table_in = [ '<table>' , '<tr><th>A</th></tr>' , '<tr><td></td></tr>' , '<tr><td>1</td></tr>' , '</table>' ] dat = Table . read ( table_in , format = 'ascii.html' ) assert ( dat . masked is True ) assert np . all ( ( dat [ 'A' ] . mask == [ True , False ] ) ) assert ( dat [ 'A' ] . dtype . kind == 'i' ) table_in = [ '<table>' , '<tr><th>A</th></tr>' , '<tr><td>...</td></tr>' , '<tr><td>1</td></tr>' , '</table>' ] dat = Table . read ( table_in , format = 'ascii.html' , fill_values = [ ( '...' , '0' ) ] ) assert ( dat . masked is True ) assert np . all ( ( dat [ 'A' ] . mask == [ True , False ] ) ) assert ( dat [ 'A' ] . dtype . kind == 'i' )
test reading a table with missing data .