#NEWLINE# def testAvg( self ) : #NEWLINE# #INDENT# " Test aggregation method 'avg' " #NEWLINE# assertEqual = self . assertEqual #NEWLINE# values = [ 2 , 1.7 , 3 , 1 ] #NEWLINE# aggregate = S3GroupAggregate ( 'avg' , 'Example' , values ) #NEWLINE# assertEqual ( aggregate . result , 1.925 ) #NEWLINE# values = None #NEWLINE# aggregate = S3GroupAggregate ( 'avg' , 'Example' , values ) #NEWLINE# assertEqual ( aggregate . result , None ) #NEWLINE# values = [ '1' , 'other' ] #NEWLINE# aggregate = S3GroupAggregate ( 'avg' , 'Example' , values ) #NEWLINE# assertEqual ( aggregate . result , None )