'Tests appending a Simple ImageHDU to an empty HDUList.'

def test_append_extension_to_empty_list(self):

    hdul = fits.HDUList()
    hdu = fits.ImageHDU(np.arange(100, dtype=np.int32))
    hdul.append(hdu)
    info = [(0, 'PRIMARY', 1, 'PrimaryHDU', 4, (100,), 'int32', '')]
    assert (hdul.info(output=False) == info)
    hdul.writeto(self.temp('test-append.fits'))
    assert (fits.info(self.temp('test-append.fits'), output=False) == info)
