'Regression test for https://github.com/astropy/astropy/issues/5988'

def test_table_writeto_header(self):

    data = np.zeros((5,), dtype=[('x', np.float), ('y', np.int)])
    h_in = fits.Header()
    h_in['ANSWER'] = (42.0, 'LTU&E')
    filename = self.temp('tabhdr42.fits')
    fits.writeto(filename, data=data, header=h_in, overwrite=True)
    h_out = fits.getheader(filename, ext=1)
    assert (h_out['ANSWER'] == 42)
