'Tests the use of a file like object with no tell or seek methods
in HDUList.writeto(), HDULIST.flush() or astropy.io.fits.writeto()'

def test_file_like(self):

    hdu = fits.PrimaryHDU(np.arange(100, dtype=np.int32))
    hdul = fits.HDUList()
    hdul.append(hdu)
    tmpfile = open(self.temp('tmpfile.fits'), 'wb')
    hdul.writeto(tmpfile)
    tmpfile.close()
    info = [(0, 'PRIMARY', 1, 'PrimaryHDU', 5, (100,), 'int32', '')]
    assert (fits.info(self.temp('tmpfile.fits'), output=False) == info)
