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

def test_streaming_hdu_write_file(self):

    arr = np.zeros((5, 5), dtype=np.int32)
    with open(self.temp('new.fits'), 'ab+') as f:
        shdu = self._make_streaming_hdu(f)
        shdu.write(arr)
        assert shdu.writecomplete
        assert (shdu.size == 100)
    hdul = fits.open(self.temp('new.fits'))
    assert (len(hdul) == 1)
    assert (hdul[0].data == arr).all()
