#NEWLINE# def testEvenlyWeightedSamples( self ) : #NEWLINE# #INDENT# x = range ( 1 , 101 ) #NEWLINE# weights = [ 1 for _ in x ] #NEWLINE# self . assertEqual ( 50 , ycsb . _WeightedQuantile ( x , self , 0.5 ) ) #NEWLINE# self . assertEqual ( 75 , ycsb . _WeightedQuantile ( x , weights , 0.75 ) ) #NEWLINE# self . assertEqual ( 90 , ycsb . _WeightedQuantile ( x , weights , 0.9 ) ) #NEWLINE# self . assertEqual ( 95 , ycsb . _WeightedQuantile ( x , weights , 0.95 ) ) #NEWLINE# self . assertEqual ( 99 , ycsb . _WeightedQuantile ( x , weights , 0.99 ) ) #NEWLINE# self . assertEqual ( 100 , ycsb . _WeightedQuantile ( x , weights , 1 ) )