'Test streaming an HDU to an open file-like object.'

def test_streaming_hdu_write_file_like(self):

    arr = np.zeros((5, 5), dtype=np.int32)
    sf = io.BytesIO()
    shdu = self._make_streaming_hdu(sf)
    shdu.write(arr)
    assert shdu.writecomplete
    assert (shdu.size == 100)
    sf.seek(0)
    hdul = fits.open(sf)
    assert (len(hdul) == 1)
    assert (hdul[0].data == arr).all()
