#NEWLINE# def testMinInt( self ) : #NEWLINE# #INDENT# MIN = 2 #NEWLINE# decoder = option_decoders . FloatDecoder ( min = MIN , option = _OPTION ) #NEWLINE# with self . assertRaises ( errors . Config . InvalidValue ) as cm : #NEWLINE# #INDENT# decoder . Decode ( 0 , _COMPONENT , _FLAGS ) #NEWLINE# #UNINDENT# self . assertEqual ( str ( decoder . exception ) , ( 'Invalid test_component.test_option value: "0". Value must be at least %s.' % MIN ) ) #NEWLINE# self . assertIs ( decoder . Decode ( MIN , _COMPONENT , _FLAGS ) , MIN ) #NEWLINE# self . assertIs ( decoder . Decode ( 2.0 , _COMPONENT , _FLAGS ) , 2.0 ) #NEWLINE# self . assertIs ( decoder . Decode ( 5 , _COMPONENT , _FLAGS ) , 5 )