'Regression test for https://github.com/astropy/astropy/issues/2774
This tests reading from a ``GzipFile`` object from Astropy\'s
compatibility copy of the ``gzip`` module.'

def test_read_open_astropy_gzip_file(self):

    gf = gzip.GzipFile(self._make_gzip_file())
    try:
        assert (len(fits.open(gf)) == 5)
    finally:
        gf.close()
