'Implemented for both test_write_stringio and test_write_bytesio.'

def _test_write_string_bytes_io(self, fileobj):

    with fits.open(self.data('test0.fits')) as hdul:
        hdul.writeto(fileobj)
        hdul2 = fits.HDUList.fromstring(fileobj.getvalue())
        assert FITSDiff(hdul, hdul2).identical
