public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2011-02-04  6:03 zmedico
  0 siblings, 0 replies; 6+ messages in thread
From: zmedico @ 2011-02-04  6:03 UTC (permalink / raw
  To: gentoo-commits

commit:     163bb043998decfbe67980e82f9545aa96515e47
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  4 06:03:07 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb  4 06:03:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=163bb043998decfbe67980e82f9545aa96515e47

REQUIRED_USE: more display tests

---
 pym/portage/tests/dep/testCheckRequiredUse.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/dep/testCheckRequiredUse.py b/pym/portage/tests/dep/testCheckRequiredUse.py
index d6a9d0c..332c5a5 100644
--- a/pym/portage/tests/dep/testCheckRequiredUse.py
+++ b/pym/portage/tests/dep/testCheckRequiredUse.py
@@ -180,6 +180,16 @@ class TestCheckRequiredUse(TestCase):
 				"^^ ( ( a b c ) ( b c d ) )",
 				["a", "b", "c", "d"],
 				"^^ ( ( a b c ) ( b c d ) )"
+			),
+			(
+				"^^ ( ( a b c ) ( b c !d ) )",
+				["a", "b", "c"],
+				"^^ ( ( a b c ) ( b c !d ) )"
+			),
+			(
+				"^^ ( ( a b c ) ( b c !d ) )",
+				["a", "b", "c", "d"],
+				""
 			)
 		)
 		for required_use, use, expected in test_cases:



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2011-04-11 23:00 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-04-11 23:00 UTC (permalink / raw
  To: gentoo-commits

commit:     d7dbb7e0f266bb24ab284a1e66d66e6a145d0901
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 11 23:00:02 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Apr 11 23:00:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d7dbb7e0

extract_affecting_use: test bug #363073

---
 pym/portage/tests/dep/testExtractAffectingUSE.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/dep/testExtractAffectingUSE.py b/pym/portage/tests/dep/testExtractAffectingUSE.py
index f998bbb..c37787d 100644
--- a/pym/portage/tests/dep/testExtractAffectingUSE.py
+++ b/pym/portage/tests/dep/testExtractAffectingUSE.py
@@ -36,6 +36,9 @@ class TestExtractAffectingUSE(TestCase):
 			("a? ( A )", "B", []),
 
 			("a? ( || ( A B ) )", "B", ["a"]),
+
+			# test USE dep defaults for bug #363073
+			("a? ( >=dev-lang/php-5.2[pcre(+)] )", ">=dev-lang/php-5.2[pcre(+)]", ["a"]),
 		)
 
 		test_cases_xfail = (



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2011-06-09 14:28 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-06-09 14:28 UTC (permalink / raw
  To: gentoo-commits

commit:     a7f6576ff0b68e69a4c76402d6168ede39a69e5b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 14:28:14 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 14:28:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7f6576f

test_use_reduce: test empty parens (bug 370565)

---
 pym/portage/tests/dep/test_use_reduce.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/dep/test_use_reduce.py b/pym/portage/tests/dep/test_use_reduce.py
index b89752f..ac81563 100644
--- a/pym/portage/tests/dep/test_use_reduce.py
+++ b/pym/portage/tests/dep/test_use_reduce.py
@@ -568,7 +568,9 @@ class UseReduce(TestCase):
 			UseReduceTestCase("( || ( || bar? ( A ) foo? ( B ) ) )"),
 			UseReduceTestCase("foo?"),
 			UseReduceTestCase("foo? || ( A )"),
-			
+			UseReduceTestCase("|| ( )"),
+			UseReduceTestCase("foo? ( )"),
+
 			#SRC_URI stuff
 			UseReduceTestCase("http://foo/bar -> blah.tbz2", is_src_uri = True, eapi = EAPI_WITHOUT_SRC_URI_ARROWS),
 			UseReduceTestCase("|| ( http://foo/bar -> blah.tbz2 )", is_src_uri = True, eapi = EAPI_WITH_SRC_URI_ARROWS),



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2011-10-05 16:11 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-10-05 16:11 UTC (permalink / raw
  To: gentoo-commits

commit:     fa2ee875483ff160d8732ecf12c4801f4b148f93
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  5 16:11:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct  5 16:11:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fa2ee875

test_best_match_to_list: test all permutations

---
 pym/portage/tests/dep/test_best_match_to_list.py |   28 +++++++++++++++-------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/pym/portage/tests/dep/test_best_match_to_list.py b/pym/portage/tests/dep/test_best_match_to_list.py
index 9cf5abd..58ab95b 100644
--- a/pym/portage/tests/dep/test_best_match_to_list.py
+++ b/pym/portage/tests/dep/test_best_match_to_list.py
@@ -1,7 +1,9 @@
 # test_best_match_to_list.py -- Portage Unit Testing Functionality
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+from itertools import permutations
+
 from portage.tests import TestCase
 from portage.dep import Atom, best_match_to_list
 
@@ -13,6 +15,7 @@ class Test_best_match_to_list(TestCase):
 		list of matching atoms.
 		"""
 		ret = []
+		mylist = list(mylist)
 		while mylist:
 			m = best_match_to_list(mypkg, mylist)
 			if m is not None:
@@ -26,22 +29,29 @@ class Test_best_match_to_list(TestCase):
 	def testBest_match_to_list(self):
 		tests = [
 					("dev-libs/A-4", [Atom(">=dev-libs/A-3"), Atom(">=dev-libs/A-2")], \
-						[Atom(">=dev-libs/A-3"), Atom(">=dev-libs/A-2")]),
+						[Atom(">=dev-libs/A-3"), Atom(">=dev-libs/A-2")], True),
 					("dev-libs/A-4", [Atom("<=dev-libs/A-5"), Atom("<=dev-libs/A-6")], \
-						[Atom("<=dev-libs/A-5"), Atom("<=dev-libs/A-6")]),
+						[Atom("<=dev-libs/A-5"), Atom("<=dev-libs/A-6")], True),
 					("dev-libs/A-1", [Atom("dev-libs/A"), Atom("=dev-libs/A-1")], \
-						[Atom("=dev-libs/A-1"), Atom("dev-libs/A")]),
+						[Atom("=dev-libs/A-1"), Atom("dev-libs/A")], True),
 					("dev-libs/A-1", [Atom("dev-libs/B"), Atom("=dev-libs/A-1:0")], \
-						[Atom("=dev-libs/A-1:0")]),
+						[Atom("=dev-libs/A-1:0")], True),
 					("dev-libs/A-1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=dev-libs/A-1:0")], \
-						[Atom("=dev-libs/A-1:0"), Atom("dev-libs/*", allow_wildcard=True)]),
+						[Atom("=dev-libs/A-1:0"), Atom("dev-libs/*", allow_wildcard=True)], True),
 					("dev-libs/A-1:0", [Atom("dev-*/*", allow_wildcard=True), Atom("dev-*/*:0", allow_wildcard=True),\
 						Atom("dev-libs/A"), Atom("<=dev-libs/A-2"), Atom("dev-libs/A:0"), \
 						Atom("=dev-libs/A-1*"), Atom("~dev-libs/A-1"), Atom("=dev-libs/A-1")], \
 						[Atom("=dev-libs/A-1"), Atom("~dev-libs/A-1"), Atom("=dev-libs/A-1*"), \
 						Atom("dev-libs/A:0"), Atom("<=dev-libs/A-2"), Atom("dev-libs/A"), \
-						Atom("dev-*/*:0", allow_wildcard=True), Atom("dev-*/*", allow_wildcard=True)])
+						Atom("dev-*/*:0", allow_wildcard=True), Atom("dev-*/*", allow_wildcard=True)], False)
 				]
 
-		for pkg, atom_list, result in tests:
-			self.assertEqual( self.best_match_to_list_wrapper( pkg, atom_list ), result )
+		for pkg, atom_list, result, all_permutations in tests:
+			if all_permutations:
+				atom_lists = permutations(atom_list)
+			else:
+				atom_lists = [atom_list]
+			for atom_list in atom_lists:
+				self.assertEqual(
+					self.best_match_to_list_wrapper(pkg, atom_list),
+					result)



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2012-06-12  7:22 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-06-12  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     04b2e10ee87e4a09543d0b45d54dbcc9c4c990c8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 07:21:57 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 07:21:57 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=04b2e10e

test_match_from_list: fix _pkg_str usage

---
 pym/portage/tests/dep/test_match_from_list.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/dep/test_match_from_list.py b/pym/portage/tests/dep/test_match_from_list.py
index afba414..fae473e 100644
--- a/pym/portage/tests/dep/test_match_from_list.py
+++ b/pym/portage/tests/dep/test_match_from_list.py
@@ -1,10 +1,10 @@
-# Copyright 2006, 2010 Gentoo Foundation
+# Copyright 2006-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import sys
 from portage.tests import TestCase
 from portage.dep import Atom, match_from_list, _repo_separator
-from portage.versions import catpkgsplit
+from portage.versions import catpkgsplit, _pkg_str
 
 if sys.hexversion >= 0x3000000:
 	basestring = str
@@ -16,7 +16,7 @@ class Package(object):
 	def __init__(self, atom):
 		atom = Atom(atom, allow_repo=True)
 		self.cp = atom.cp
-		self.cpv = atom.cpv
+		self.cpv = _pkg_str(atom.cpv, slot=(atom.slot or '0'), repo=atom.repo)
 		self.cpv_split = catpkgsplit(self.cpv)
 		self.slot = atom.slot
 		self.repo = atom.repo



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/
@ 2012-06-23  1:01 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-06-23  1:01 UTC (permalink / raw
  To: gentoo-commits

commit:     c28d55d9f49fce96cdbbef55fc49ac3f66d40193
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 23 01:01:29 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 23 01:01:29 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c28d55d9

test_match_from_list: test slot-abi more

---
 pym/portage/tests/dep/test_match_from_list.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/dep/test_match_from_list.py b/pym/portage/tests/dep/test_match_from_list.py
index d6649ad..e80345d 100644
--- a/pym/portage/tests/dep/test_match_from_list.py
+++ b/pym/portage/tests/dep/test_match_from_list.py
@@ -108,6 +108,14 @@ class Test_match_from_list(TestCase):
 			("virtual/ffmpeg:*", [Package("=virtual/ffmpeg-0.10.3:0/53")], ["virtual/ffmpeg-0.10.3"] ),
 			("virtual/ffmpeg:0*", [Package("=virtual/ffmpeg-0.10.3:0/53")], ["virtual/ffmpeg-0.10.3"] ),
 			("virtual/ffmpeg:0", [Package("=virtual/ffmpeg-0.10.3:0/53")], ["virtual/ffmpeg-0.10.3"] ),
+
+			("sys-libs/db:4.8/4.8", [Package("=sys-libs/db-4.8.30:4.8")], ["sys-libs/db-4.8.30"] ),
+			("sys-libs/db:4.8/4.8=", [Package("=sys-libs/db-4.8.30:4.8")], ["sys-libs/db-4.8.30"] ),
+			("sys-libs/db:4.8=", [Package("=sys-libs/db-4.8.30:4.8")], ["sys-libs/db-4.8.30"] ),
+			("sys-libs/db:4.8*", [Package("=sys-libs/db-4.8.30:4.8")], ["sys-libs/db-4.8.30"] ),
+			("sys-libs/db:*", [Package("=sys-libs/db-4.8.30:4.8")], ["sys-libs/db-4.8.30"] ),
+			("sys-libs/db:4.8/0", [Package("=sys-libs/db-4.8.30:4.8")], [] ),
+			("sys-libs/db:4.8/0=", [Package("=sys-libs/db-4.8.30:4.8")], [] ),
 		)
 
 		for atom, cpv_list, expected_result in tests:



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-23  1:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09 14:28 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dep/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2012-06-23  1:01 Zac Medico
2012-06-12  7:22 Zac Medico
2011-10-05 16:11 Zac Medico
2011-04-11 23:00 Zac Medico
2011-02-04  6:03 zmedico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox