#NEWLINE# def test( self ) : #NEWLINE# #INDENT# self . assertTrue ( ( '/test_var/structure variable' in self . h5file ) ) #NEWLINE# tbl = self . h5file . get_node ( '/test_var/structure variable' ) #NEWLINE# self . assertTrue ( isinstance ( tbl , tables . Table ) ) #NEWLINE# self . assertEqual ( tbl . colnames , [ 'a' , 'b' , 'c' , 'd' ] ) #NEWLINE# self . assertEqual ( tbl . coltypes [ 'a' ] , 'float64' ) #NEWLINE# self . assertEqual ( tbl . coldtypes [ 'a' ] . shape , ( ) ) #NEWLINE# self . assertEqual ( tbl . coltypes [ 'b' ] , 'float64' ) #NEWLINE# self . assertEqual ( tbl . coldtypes [ 'b' ] . shape , ( ) ) #NEWLINE# self . assertEqual ( tbl . coltypes [ 'c' ] , 'float64' ) #NEWLINE# self . assertEqual ( tbl . coldtypes [ 'c' ] . shape , ( 2 , ) ) #NEWLINE# self . assertEqual ( tbl . coltypes [ 'd' ] , 'string' ) #NEWLINE# self . assertEqual ( tbl . coldtypes [ 'd' ] . shape , ( ) ) #NEWLINE# for row in tbl . iterrows ( ) : #NEWLINE# #INDENT# self . assertEqual ( row [ 'a' ] , 3.0 ) #NEWLINE# self . assertEqual ( row [ 'b' ] , 4.0 ) #NEWLINE# self . assertTrue ( allequal ( row [ 'c' ] , numpy . array ( [ 2.0 , 3.0 ] , dtype = 'float64' ) ) ) #NEWLINE# self . assertEqual ( row [ 'd' ] , b'd' ) #NEWLINE# #UNINDENT# self . h5file . close ( )