#NEWLINE# def test_writeto_bzip2_filename( self ) : #NEWLINE# #INDENT# 'Test writing to a bzip2 file by name' #NEWLINE# filename = self . temp ( 'testname.fits.bz2' ) #NEWLINE# h = fits . PrimaryHDU ( ) #NEWLINE# h . writeto ( filename ) #NEWLINE# with fits . open ( self . temp ( 'testname.fits.bz2' ) ) as hdul : #NEWLINE# #INDENT# assert ( hdul [ 0 ] . header == h . header )