#NEWLINE# def test_set_pythonhome( toolchains , cd_to_tmpdir ) : #NEWLINE# #INDENT# toolchains . create ( 'foo' ) #NEWLINE# qibuild . config . add_build_config ( 'foo' , toolchain = 'foo' ) #NEWLINE# python_package = toolchains . add_package ( 'foo' , 'python' ) #NEWLINE# build_worktree = TestBuildWorkTree ( ) #NEWLINE# build_worktree . set_active_config ( 'foo' ) #NEWLINE# env = build_worktree . get_env ( ) #NEWLINE# if ( sys . platform == 'darwin' ) : #NEWLINE# #INDENT# assert ( env [ 'PYTHONHOME' ] == ( python_package . path + '/Python.framework/Versions/2.7' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( env [ 'PYTHONHOME' ] == python_package . path )