#NEWLINE# def test_bins_decimals( self ) : #NEWLINE# #INDENT# rows = [ ] #NEWLINE# for i in range ( 0 , 100 ) : #NEWLINE# #INDENT# rows . append ( [ ( Decimal ( i ) / Decimal ( '100' ) ) ] ) #NEWLINE# #UNINDENT# new_table = Table ( rows , self . column_names , self . column_types ) . bins ( 'number' ) #NEWLINE# self . assertColumnNames ( new_table , [ 'number' , 'Count' ] ) #NEWLINE# self . assertColumnTypes ( new_table , [ Text , Number ] ) #NEWLINE# self . assertSequenceEqual ( new_table . rows [ 0 ] , [ '[0.0 - 0.1)' , 10 ] ) #NEWLINE# self . assertSequenceEqual ( new_table . rows [ 3 ] , [ '[0.3 - 0.4)' , 10 ] ) #NEWLINE# self . assertSequenceEqual ( new_table . rows [ 9 ] , [ '[0.9 - 1.0]' , 10 ] )