#NEWLINE# def test_parnames_round_trip( self ) : #NEWLINE# #INDENT# '\n        Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/130\n\n        Ensures that opening a random groups file in update mode or writing it\n        to a new file does not cause any change to the parameter names.\n        ' #NEWLINE# self . copy_file ( 'random_groups.fits' ) #NEWLINE# parameters = [ 'UU' , 'VV' , 'WW' , 'BASELINE' , 'DATE' ] #NEWLINE# with fits . open ( self . temp ( 'random_groups.fits' ) , mode = 'update' ) as h : #NEWLINE# #INDENT# assert ( h [ 0 ] . parnames == parameters ) #NEWLINE# h . flush ( ) #NEWLINE# #UNINDENT# with fits . open ( self . temp ( 'random_groups.fits' ) ) as h : #NEWLINE# #INDENT# assert ( h [ 0 ] . parnames == parameters ) #NEWLINE# h . writeto ( self . temp ( 'test.fits' ) ) #NEWLINE# #UNINDENT# with fits . open ( self . temp ( 'test.fits' ) ) as h : #NEWLINE# #INDENT# assert ( parameters [ 0 ] . parnames == parameters )