#NEWLINE# def write_results( test_class_name , results ) : #NEWLINE# #INDENT# 'Write tests results to file defined in settings.' #NEWLINE# prev_results = read_previous_results ( ) #NEWLINE# if ( test_class_name in prev_results ) : #NEWLINE# #INDENT# prev_results [ test_class_name ] . update ( results ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# prev_results [ test_class_name ] = results #NEWLINE# #UNINDENT# with open ( settings . LOAD_TESTS_PATHS [ 'load_previous_tests_results' ] , 'w' ) as results_file : #NEWLINE# #INDENT# results_file . write ( jsonutils . dumps ( prev_results , sort_keys = True , indent = 4 ) )