#NEWLINE# def assertTiming( self , exp_metric , app , exp_timing = None ) : #NEWLINE# #INDENT# timing_calls = exp_timing . access_logger . log_dict [ 'timing' ] #NEWLINE# found = False #NEWLINE# for timing_call in timing_calls : #NEWLINE# #INDENT# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , timing_call [ 1 ] ) #NEWLINE# self . assertEqual ( 2 , len ( timing_call [ 0 ] ) ) #NEWLINE# if ( timing_call [ 0 ] [ 0 ] == exp_metric ) : #NEWLINE# #INDENT# found = True #NEWLINE# if ( exp_timing is not None ) : #NEWLINE# #INDENT# self . assertAlmostEqual ( exp_timing , timing_call [ 0 ] [ 1 ] , places = 4 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( not found ) : #NEWLINE# #INDENT# self . assertTrue ( False , ( 'assertTiming: %s not found in %r' % ( exp_metric , timing_calls ) ) )