From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R6nsD-0000Zd-T6 for garchives@archives.gentoo.org; Thu, 22 Sep 2011 18:19:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF3EE21C113; Thu, 22 Sep 2011 18:19:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8AD1B21C113 for ; Thu, 22 Sep 2011 18:19:41 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 029BF1B401B for ; Thu, 22 Sep 2011 18:19:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1CECA80042 for ; Thu, 22 Sep 2011 18:19:40 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <7369c82039a3ead20d015e1856fc3f4f78d31c22.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/resolver/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/tests/resolver/test_circular_choices.py X-VCS-Directories: pym/portage/tests/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7369c82039a3ead20d015e1856fc3f4f78d31c22 Date: Thu, 22 Sep 2011 18:19:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: e06e8b4a90be58e07226ccf994cefbdb commit: 7369c82039a3ead20d015e1856fc3f4f78d31c22 Author: Zac Medico gentoo org> AuthorDate: Thu Sep 22 18:19:05 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Sep 22 18:19:05 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7369c820 Test || choice circular handling. --- .../tests/resolver/test_circular_choices.py | 32 ++++++++++++++= ++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/pym/portage/tests/resolver/test_circular_choices.py b/pym/po= rtage/tests/resolver/test_circular_choices.py new file mode 100644 index 0000000..57f76b9 --- /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 (ResolverPlaygroun= d, + ResolverPlaygroundTestCase) + +class CircularChoicesTestCase(TestCase): + + def testDirectCircularDependency(self): + + ebuilds =3D { + "dev-lang/gwydion-dylan-2.4.0": {"DEPEND": "|| ( dev-lang/gwydion-dyl= an dev-lang/gwydion-dylan-bin )" }, + "dev-lang/gwydion-dylan-bin-2.4.0": {}, + } + + test_cases =3D ( + # Automatically pull in gwydion-dylan-bin to solve a circular dep + ResolverPlaygroundTestCase( + ["dev-lang/gwydion-dylan"], + mergelist =3D ['dev-lang/gwydion-dylan-bin-2.4.0', 'dev-lang/gwydion= -dylan-2.4.0'], + success =3D True, + ), + ) + + playground =3D ResolverPlayground(ebuilds=3Debuilds) + 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()