summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/resolver
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-22 11:19:05 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-22 11:19:05 -0700
commit7369c82039a3ead20d015e1856fc3f4f78d31c22 (patch)
treeb5c6e726e0723d81ea815342b31bf77819cc4f74 /pym/portage/tests/resolver
parent1ed746be090390bd698810081f30164094ea402d (diff)
downloadportage-7369c82039a3ead20d015e1856fc3f4f78d31c22.tar.gz
portage-7369c82039a3ead20d015e1856fc3f4f78d31c22.tar.bz2
portage-7369c82039a3ead20d015e1856fc3f4f78d31c22.zip
Test || choice circular handling.
Diffstat (limited to 'pym/portage/tests/resolver')
-rw-r--r--pym/portage/tests/resolver/test_circular_choices.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pym/portage/tests/resolver/test_circular_choices.py b/pym/portage/tests/resolver/test_circular_choices.py
new file mode 100644
index 000000000..57f76b96c
--- /dev/null
+++ b/pym/portage/tests/resolver/test_circular_choices.py
@@ -0,0 +1,32 @@
+# Copyright 2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import (ResolverPlayground,
+ ResolverPlaygroundTestCase)
+
+class CircularChoicesTestCase(TestCase):
+
+ def testDirectCircularDependency(self):
+
+ ebuilds = {
+ "dev-lang/gwydion-dylan-2.4.0": {"DEPEND": "|| ( dev-lang/gwydion-dylan dev-lang/gwydion-dylan-bin )" },
+ "dev-lang/gwydion-dylan-bin-2.4.0": {},
+ }
+
+ test_cases = (
+ # Automatically pull in gwydion-dylan-bin to solve a circular dep
+ ResolverPlaygroundTestCase(
+ ["dev-lang/gwydion-dylan"],
+ mergelist = ['dev-lang/gwydion-dylan-bin-2.4.0', 'dev-lang/gwydion-dylan-2.4.0'],
+ success = True,
+ ),
+ )
+
+ playground = ResolverPlayground(ebuilds=ebuilds)
+ try:
+ for test_case in test_cases:
+ playground.run_TestCase(test_case)
+ self.assertEqual(test_case.test_success, True, test_case.fail_msg)
+ finally:
+ playground.cleanup()