#NEWLINE# def test_complex_reverse_deps( build_worktree ) : #NEWLINE# #INDENT# libworld = build_worktree . create_project ( 'libworld' ) #NEWLINE# libhello = build_worktree . create_project ( 'libhello' , build_depends = [ 'libworld' ] ) #NEWLINE# hello_plugin = build_worktree . create_project ( 'hello-plugin' ) #NEWLINE# hello = build_worktree . create_project ( 'hello' , build_depends = [ 'libworld' , 'libhello' ] , run_depends = [ 'hello-plugin' ] ) #NEWLINE# top_world = build_worktree . create_project ( 'top_world' , run_depends = [ 'hello' ] ) #NEWLINE# deps_solver = DepsSolver ( build_worktree ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ top_world ] , [ 'build' ] , reverse = True ) == [ ] ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ hello ] , [ 'build' ] , reverse = True ) == [ ] ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ hello ] , [ 'build' , 'runtime' ] , reverse = True ) == [ top_world ] ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ hello_plugin ] , [ 'runtime' ] , reverse = True ) == [ hello ] ) #NEWLINE# assert ( deps_solver . get_dep_projects ( [ libworld ] , [ 'build' , 'runtime' ] , reverse = True ) == [ hello , libhello ] )