def test_writeto_append_mode_gzip(self):

        # Note: when opening a GzipFile the 'b+' is superfluous, but this was
        # still how the original test case looked
        # Note: with statement not supported on GzipFile in older Python
        # versions
        fileobj =  gzip.GzipFile(self.temp('test.fits.gz'), 'ab+')
        h = fits.PrimaryHDU()
        try:
            h.writeto(fileobj)
        finally:
            fileobj.close()

        with fits.open(self.temp('test.fits.gz')) as hdul:
            assert hdul[0].header == h.header
Tests Poisson family with canonical log link.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_core.py/TestFileFunctions.test_writeto_append_mode_gzip--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/genmod/tests/test_glm.py/TestWtdGlmPoissonNewton.__init__