'Test reading a FITS file from a file-like object.'

def test_read_file_like_object(self):

    filelike = io.BytesIO()
    with open(self.data('test0.fits'), 'rb') as f:
        filelike.write(f.read())
    filelike.seek(0)
    with ignore_warnings():
        assert (len(fits.open(filelike)) == 5)
