#NEWLINE# def test_rate_is_correct_when_enough_samples( self ) : #NEWLINE# #INDENT# '\n        A RateMeasurer correctly reports the rate when enough\n        samples have been collected.\n        ' #NEWLINE# r = RateMeasurer ( ) #NEWLINE# target_rate = 5 #NEWLINE# self . increase_rate ( r , target_rate , r . sample_size ) #NEWLINE# self . assertEqual ( target_rate , r . rate ( ) )