#NEWLINE# def test_overwrite( self ) : #NEWLINE# #INDENT# '\n        Non-default command-line argument values overwrite config values.\n        ' #NEWLINE# s = StringIO ( ) #NEWLINE# gs = GreenStream ( s ) #NEWLINE# saved_stdout = config . sys . stdout #NEWLINE# config . sys . stdout = gs #NEWLINE# self . addCleanup ( setattr , config . sys , 'stdout' , saved_stdout ) #NEWLINE# with ModifiedEnvironment ( GREEN_CONFIG = self . env_filename , HOME = self . tmpd ) : #NEWLINE# #INDENT# new_args = copy . deepcopy ( config . default_args ) #NEWLINE# new_args . omit_patterns = 'omitstuff' #NEWLINE# new_args . run_coverage = True #NEWLINE# new_args . logging = True #NEWLINE# new_args . no_skip_report = True #NEWLINE# new_args . version = True #NEWLINE# new_args . config = s . cmd_filename #NEWLINE# computed_args = config . mergeConfig ( new_args , testing = True ) #NEWLINE# self . assertEqual ( computed_args . omit_patterns , 'omitstuff' ) #NEWLINE# self . assertEqual ( computed_args . run_coverage , new_args . run_coverage ) #NEWLINE# self . assertEqual ( computed_args . logging , new_args . logging ) #NEWLINE# self . assertEqual ( computed_args . no_skip_report , new_args . no_skip_report ) #NEWLINE# self . assertEqual ( computed_args . version , new_args . version )