#NEWLINE# def test_prefer_sources_over_packages( build_worktree , toolchains ) : #NEWLINE# #INDENT# toolchains . create ( 'foo' ) #NEWLINE# qibuild . config . add_build_config ( 'foo' , toolchain = 'foo' ) #NEWLINE# world_package = toolchains . add_package ( 'foo' , 'world' ) #NEWLINE# world_proj = build_worktree . create_project ( 'world' ) #NEWLINE# hello_proj = build_worktree . create_project ( 'hello' , build_depends = [ 'world' ] ) #NEWLINE# build_worktree . set_active_config ( 'foo' ) #NEWLINE# deps_solver = DepsSolver ( build_worktree ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ hello_proj ] , [ 'build' ] ) == [ world_proj , hello_proj ] ) #NEWLINE# assert ( not deps_solver . get_dep_packages ( [ hello_proj ] , [ 'build' ] ) )