#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . json_path = ( os . path . dirname ( os . path . abspath ( __file__ ) ) + '/json/' ) #NEWLINE# filenames = os . listdir ( self . json_path ) #NEWLINE# self . fails = [ ] #NEWLINE# for filename in filenames : #NEWLINE# #INDENT# if filename . endswith ( '.json' ) : #NEWLINE# #INDENT# with open ( ( self . json_path + filename ) ) as json_file : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# g1 = ProvDocument . deserialize ( filename ) #NEWLINE# json_str = g1 . serialize ( indent = 4 ) #NEWLINE# g2 = ProvDocument . deserialize ( content = json_str ) #NEWLINE# self . assertEqual ( g1 , g2 , ( 'Round-trip JSON encoding/decoding failed:  %s.' % filename ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . fails . append ( filename )