#NEWLINE# def test_get_final_value( self ) : #NEWLINE# #INDENT# mapping = self . _settings_mapping #NEWLINE# v = mapping . get_final_value ( 'enabled' , fparams = None ) #NEWLINE# self . assertEqual ( v , True ) #NEWLINE# mapping [ 'enabled' ] = 'enabled_kwd=' #NEWLINE# d = { #NEWLINE# #INDENT# 'enabled_kwd' : 17 , #NEWLINE# #UNINDENT# } #NEWLINE# v = mapping . get_final_value ( 'enabled' , d , fparams = None ) #NEWLINE# self . assertEqual ( v , 17 ) #NEWLINE# def f( a , enabled_kwd = 3 ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# fparams = inspect . signature ( f ) . parameters #NEWLINE# v = mapping . get_final_value ( 'enabled' , fparams = fparams ) #NEWLINE# self . assertEqual ( v , 3 ) #NEWLINE# def g( a , wrong_kwd = 'nevermind' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# gparams = inspect . signature ( g ) . parameters #NEWLINE# v = mapping . get_final_value ( 'enabled' , fparams = gparams ) #NEWLINE# self . assertEqual ( v , False ) #NEWLINE# def h( a , enabled_kwd = [ ] ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# hparams = inspect . signature ( h ) . parameters #NEWLINE# v = mapping . get_final_value ( 'enabled' , fparams = hparams ) #NEWLINE# self . assertEqual ( v , False )