From: Zac Medico Date: Sun, 13 Feb 2011 11:34:32 +0000 (-0800) Subject: ResolverDepthTestCase: add more cases X-Git-Tag: v2.2.0_alpha24~21 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cb23a2b4a53fb4847ca1c89492bed3fd7e408923;p=portage.git ResolverDepthTestCase: add more cases --- diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py index 5a309416d..dc670052e 100644 --- a/pym/portage/tests/resolver/test_depth.py +++ b/pym/portage/tests/resolver/test_depth.py @@ -24,6 +24,8 @@ class ResolverDepthTestCase(TestCase): "dev-libs/C-1": {}, } + world = ["dev-libs/A"] + test_cases = ( ResolverPlaygroundTestCase( ["dev-libs/A"], @@ -39,12 +41,37 @@ class ResolverDepthTestCase(TestCase): ResolverPlaygroundTestCase( ["dev-libs/A"], - options = {"--update": True, "--deep": 3}, + options = {"--update": True, "--deep": 2}, + success = True, + mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]), + + ResolverPlaygroundTestCase( + ["@world"], + options = {"--update": True, "--deep": True}, + success = True, + mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]), + + ResolverPlaygroundTestCase( + ["@world"], + options = {"--emptytree": True}, success = True, mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]), + + ResolverPlaygroundTestCase( + ["@world"], + options = {"--selective": True, "--deep": True}, + success = True, + mergelist = []), + + ResolverPlaygroundTestCase( + ["dev-libs/A"], + options = {"--deep": 2}, + success = True, + mergelist = ["dev-libs/A-2"]), ) - playground = ResolverPlayground(ebuilds=ebuilds, installed=installed) + playground = ResolverPlayground(ebuilds=ebuilds, installed=installed, + world=world) try: for test_case in test_cases: playground.run_TestCase(test_case)