#NEWLINE# def test_optional_both( self ) : #NEWLINE# #INDENT# options = core . Options ( arguments . Argument ( 'first' ) , 'also' , 'using' , arguments . Argument ( 'second' , required = False ) ) #NEWLINE# dummy_tokens = DummyTokens ( 'firstval' , 'also' , 'using' , 'secondval' ) #NEWLINE# ( kwargs , blocks ) = options . parse ( dummy_parser , dummy_tokens ) #NEWLINE# self . assertEqual ( blocks , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( len ( kwargs ) , 2 ) #NEWLINE# dummy_context = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( kwargs [ 'first' ] . resolve ( dummy_context ) , 'firstval' ) #NEWLINE# self . assertEqual ( kwargs [ 'second' ] . resolve ( dummy_context ) , 'secondval' )