#NEWLINE# def test_re_adding_build_config_preserves_env( qibuild_action ) : #NEWLINE# #INDENT# qibuild_cfg = qibuild . config . QiBuildConfig ( ) #NEWLINE# qibuild_cfg . read ( create_if_missing = True ) #NEWLINE# foo_config = qibuild . config . BuildConfig ( ) #NEWLINE# foo_config . name = 'foo' #NEWLINE# foo_config . env . path = '/path/to/foo/bin' #NEWLINE# qibuild_cfg . add_config ( qibuild_cfg ) #NEWLINE# qibuild_cfg . write ( ) #NEWLINE# qibuild_action ( 'add-config' , 'foo' , '--toolchain' , 'foo' ) #NEWLINE# qibuild_cfg2 = qibuild . config . QiBuildConfig ( ) #NEWLINE# qibuild_cfg2 . read ( ) #NEWLINE# foo_config = qibuild_cfg2 . configs [ 'foo' ] #NEWLINE# assert ( foo_config . env . path == '/path/to/foo/bin' )