#NEWLINE# def test_variable_length_table_data( self ) : #NEWLINE# #INDENT# c1 = fits . Column ( name = 'var' , format = 'PJ()' , array = np . array ( [ [ 45.0 , 56 ] , np . array ( [ 11 , 12 , 13 ] ) ] , 'O' ) ) #NEWLINE# c2 = fits . Column ( name = 'xyz' , format = '2I' , array = [ [ 11 , 3 ] , [ 12 , 4 ] ] ) #NEWLINE# tbhdu = fits . BinTableHDU . from_columns ( [ c1 , c2 ] ) #NEWLINE# tbhdu . writeto ( self . temp ( 'tmp.fits' ) , clobber = True , checksum = True ) #NEWLINE# with fits . open ( self . temp ( 'tmp.fits' ) , checksum = True ) as hdul : #NEWLINE# #INDENT# assert comparerecords ( tbhdu . data , hdul [ 1 ] . data ) #NEWLINE# assert ( 'CHECKSUM' in hdul [ 0 ] . header ) #NEWLINE# assert ( hdul [ 0 ] . header [ 'CHECKSUM' ] == 'D8iBD6ZAD6fAD6ZA' ) #NEWLINE# assert ( 'DATASUM' in hdul [ 0 ] . header ) #NEWLINE# assert ( hdul [ 0 ] . header [ 'DATASUM' ] == '0' ) #NEWLINE# assert ( 'CHECKSUM' in hdul [ 1 ] . header ) #NEWLINE# assert ( hdul [ 1 ] . header [ 'CHECKSUM' ] == 'YIGoaIEmZIEmaIEm' ) #NEWLINE# assert ( 'DATASUM' in hdul [ 1 ] . header ) #NEWLINE# assert ( hdul [ 1 ] . header [ 'DATASUM' ] == '1507485' )