#NEWLINE# def test03_endianess( self ) : #NEWLINE# #INDENT# 'Checking if table is endianess aware.' #NEWLINE# if common . verbose : #NEWLINE# #INDENT# print ( '\n' , ( '-=' * 30 ) ) #NEWLINE# print ( ( 'Running %s.test03_endianess...' % self . __class__ . __name__ ) ) #NEWLINE# #UNINDENT# self . h5file = tables . open_file ( self . h5fname , 'r' ) #NEWLINE# table = self . h5file . get_node ( '/group0/group1/table2' ) #NEWLINE# result = [ r [ 'var2' ] for r in table . iterrows ( ) if ( r [ 'var3' ] < 20 ) ] #NEWLINE# if common . verbose : #NEWLINE# #INDENT# print ( 'Nrows in' , table . _v_pathname , ':' , table . nrows ) #NEWLINE# print ( 'On-disk byteorder ==>' , table . byteorder ) #NEWLINE# print ( 'Last record in table ==>' , r ) #NEWLINE# print ( 'Total selected records in table ==>' , len ( result ) ) #NEWLINE# #UNINDENT# nrows = ( self . expectedrows - 1 ) #NEWLINE# r = list ( table . iterrows ( ) ) [ ( - 1 ) ] #NEWLINE# self . assertEqual ( ( r [ 'var1' ] [ 0 ] [ 0 ] , r [ 'var3' ] ) , ( b'0001' , nrows ) ) #NEWLINE# self . assertEqual ( len ( result ) , 20 )