#NEWLINE# def test_stream( self ) : #NEWLINE# #INDENT# stream = range ( 10 ) #NEWLINE# mean_computation = algo . MeanComputation ( ) #NEWLINE# for value in stream : #NEWLINE# #INDENT# mean_computation . add ( value ) #NEWLINE# #UNINDENT# excepted_mean = ( float ( sum ( stream ) ) / len ( stream ) ) #NEWLINE# self . assertEqual ( excepted_mean , mean_computation . result ( ) )