#NEWLINE# def testInvalidFlagValue( self ) : #NEWLINE# #INDENT# with self . assertRaises ( errors . Config . InvalidValue ) as cm : #NEWLINE# #INDENT# self . _decoder . Decode ( { #NEWLINE# #INDENT# 'test_flag' : 'two' , #NEWLINE# #UNINDENT# } , _COMPONENT , cm . _flag_values ) #NEWLINE# #UNINDENT# self . assertEqual ( str ( cm . exception ) , 'Invalid test_component.test_option.test_flag value: "two" (of type "str").{0}flag --test_flag=two: invalid literal for int() with base 10: \'two\'' . format ( os . linesep ) )