#NEWLINE# def test_CSVCaseIterator_read_external_file_with_header( self ) : #NEWLINE# #INDENT# csv_data = [ '"comp1.x", "comp1.y", "comp2.b_string"\n' , '33.5, 76.2, "Hello There"\n3.14159, 0, "Goodbye z"\n' ] #NEWLINE# outfile = open ( self . filename , 'w' ) #NEWLINE# outfile . writelines ( csv_data ) #NEWLINE# outfile . close ( ) #NEWLINE# self . top . comp2 . add ( 'b_string' , Str ( "Hello',;','" , iotype = 'in' ) ) #NEWLINE# sout = StringIO . StringIO ( ) #NEWLINE# cases = [ case for case in CSVCaseIterator ( filename = self . filename ) ] #NEWLINE# self . top . driver . clear_parameters ( ) #NEWLINE# Case . set_vartree_inputs ( self . top . driver , cases ) #NEWLINE# self . top . recorders = [ DumpCaseRecorder ( sout ) ] #NEWLINE# self . top . run ( ) #NEWLINE# self . assertEqual ( self . top . comp1 . x , 3.14159 ) #NEWLINE# self . assertEqual ( self . top . comp1 . y , 0.0 ) #NEWLINE# self . assertEqual ( self . top . comp2 . b_string , 'Goodbye z' )