#NEWLINE# def testMidWeight( self ) : #NEWLINE# #INDENT# x = [ 0 , 1.2 , 4 ] #NEWLINE# weights = [ 1 , 98 , 1 ] #NEWLINE# for i in xrange ( 2 , 99 ) : #NEWLINE# #INDENT# self . assertAlmostEqual ( 1.2 , ycsb . _WeightedQuantile ( x , weights , ( weights / 100.0 ) ) ) #NEWLINE# #UNINDENT# self . assertEqual ( 4 , ycsb . _WeightedQuantile ( x , weights , 0.995 ) )