#NEWLINE# def test_read_file_like_object( self ) : #NEWLINE# #INDENT# 'Test reading a FITS file from a file-like object.' #NEWLINE# filelike = BytesIO ( ) #NEWLINE# with open ( self . data ( 'test0.fits' ) , 'rb' ) as f : #NEWLINE# #INDENT# filelike . write ( f . read ( ) ) #NEWLINE# #UNINDENT# filelike . seek ( 0 ) #NEWLINE# with ignore_warnings ( ) : #NEWLINE# #INDENT# assert ( len ( fits . open ( filelike ) ) == 5 )