'Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/198'

def test_lossless_gzip_compression(self):

    noise = np.random.normal(size=(1000, 1000))
    chdu1 = fits.CompImageHDU(data=noise, compressionType='GZIP_1')
    chdu1.writeto(self.temp('test.fits'))
    with fits.open(self.temp('test.fits')) as h:
        assert (np.abs((noise - h[1].data)).max() > 0.0)
    del h
    chdu2 = fits.CompImageHDU(data=noise, compressionType='GZIP_1', quantizeLevel=0.0)
    with ignore_warnings():
        chdu2.writeto(self.temp('test.fits'), overwrite=True)
    with fits.open(self.temp('test.fits')) as h:
        assert (noise == h[1].data).all()
