def test_read_open_file(self):

        with open(self.data('test0.fits'), 'rb') as f:
            assert len(fits.open(f)) == 5
Read from an existing file object.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_core.py/TestFileFunctions.test_read_open_file