#NEWLINE# def test04_multidim( self ) : #NEWLINE# #INDENT# 'Appending multi-dimensional enumerated data.' #NEWLINE# tbl = self . h5file . create_table ( '/' , 'test' , self . _description ( ( 2 , ) ) , title = self . _getMethodName ( ) ) #NEWLINE# appended = [ ( 10 , ( self . valueInEnum , self . valueOutOfEnum ) ) , ( 20 , ( self . valueInEnum , self . valueOutOfEnum ) ) ] #NEWLINE# row = tbl . row #NEWLINE# row [ 'rid' ] = appended [ 0 ] [ 0 ] #NEWLINE# self . assertRaises ( ValueError , operator . setitem , row , 'rcolor' , appended [ 0 ] [ 1 ] ) #NEWLINE# tbl . append ( appended ) #NEWLINE# tbl . flush ( ) #NEWLINE# tbl . flavor = 'python' #NEWLINE# read = tbl . read ( ) #NEWLINE# for i in range ( len ( appended ) ) : #NEWLINE# #INDENT# self . assertEqual ( appended [ i ] [ 0 ] , read [ i ] [ 0 ] , 'Written and read values differ.' ) #NEWLINE# self . assertEqual ( appended [ i ] [ 1 ] [ 0 ] , read [ i ] [ 1 ] [ 0 ] , 'Written and read values differ.' ) #NEWLINE# self . assertEqual ( self [ i ] [ 1 ] [ 1 ] , read [ i ] [ 1 ] [ 1 ] , 'Written and read values differ.' )