#NEWLINE# def verify( self , sout , filename ) : #NEWLINE# #INDENT# path = os . path . join ( self . path , filename ) #NEWLINE# with open ( path , 'r' ) as inp : #NEWLINE# #INDENT# old_json = json . load ( inp ) #NEWLINE# #UNINDENT# new_json = json . loads ( sout . getvalue ( ) ) #NEWLINE# old = list ( self . _dict_iter ( old_json ) ) #NEWLINE# new = list ( self . _dict_iter ( new_json ) ) #NEWLINE# if ( len ( old ) != len ( new ) ) : #NEWLINE# #INDENT# self . fail ( ( 'Number of items (%d) != number of items expected (%d)' % ( len ( old ) , len ( new ) ) ) ) #NEWLINE# #UNINDENT# ignore = set ( [ 'uuid' , 'OpenMDAO_Version' , '_id' , '_driver_id' , '_parent_id' , 'timestamp' , 'pcomp_name' ] ) #NEWLINE# for ( ( oldname , oldval ) , ( newname , newval ) ) in zip ( old , new ) : #NEWLINE# #INDENT# if oldname . startswith ( '__length_' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( oldname in ignore ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( oldname == newname ) : #NEWLINE# #INDENT# self . assertAlmostEqual ( oldname , newname , ( '%s != %s' % ( oldname , newname ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( oldname , newname )