def test_writeto_bzip2_fileobj(self):
        fileobj = bz2.BZ2File(self.temp('test.fits.bz2'), 'w')
        h = fits.PrimaryHDU()
        try:
            h.writeto(fileobj)
        finally:
            fileobj.close()

        with fits.open(self.temp('test.fits.bz2')) as hdul:
            assert hdul[0].header == h.header
The main entry point for quits.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_core.py/TestFileFunctions.test_writeto_bzip2_fileobj--crossover with--dataset/ETHPy150Open google/macops/crankd/NSWorkspaceHandler.py/NSWorkspaceHandler.OnApplicationQuit