#NEWLINE# def test01_rowAppend( self ) : #NEWLINE# #INDENT# 'Appending enumerated values using ``row.append()``.' #NEWLINE# tbl = self . h5file . create_table ( '/' , 'test' , self . _description ( ) , title = self . _getMethodName ( ) ) #NEWLINE# appended = [ ( 10 , self . valueInEnum ) , ( 20 , self . valueOutOfEnum ) ] #NEWLINE# row = tbl . row #NEWLINE# row [ 'rid' ] = appended [ 0 ] [ 0 ] #NEWLINE# row [ 'rcolor' ] = appended [ 0 ] [ 1 ] #NEWLINE# row . append ( ) #NEWLINE# row [ 'rid' ] = appended [ 1 ] [ 0 ] #NEWLINE# self . assertRaises ( ValueError , operator . setitem , row , 'rcolor' , appended [ 1 ] [ 1 ] ) #NEWLINE# tbl . flush ( ) #NEWLINE# tbl . flavor = 'python' #NEWLINE# read = tbl . read ( ) #NEWLINE# common . verbosePrint ( ( '* appended value: %s\n* read value: %s\n' % ( appended [ : ( - 1 ) ] , read ) ) ) #NEWLINE# self . assertEqual ( appended [ : ( - 1 ) ] , read , 'Written and read values differ.' )