public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10398 - in main/trunk/pym/portage/tests: . dep
@ 2008-05-25  2:20 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-05-25  2:20 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-05-25 02:20:45 +0000 (Sun, 25 May 2008)
New Revision: 10398

Modified:
   main/trunk/pym/portage/tests/__init__.py
   main/trunk/pym/portage/tests/dep/test_dep_getusedeps.py
Log:
* Fix dep_getusedeps() test to work with tuples.
* Add test cases for conditional USE deps.


Modified: main/trunk/pym/portage/tests/__init__.py
===================================================================
--- main/trunk/pym/portage/tests/__init__.py	2008-05-25 01:54:42 UTC (rev 10397)
+++ main/trunk/pym/portage/tests/__init__.py	2008-05-25 02:20:45 UTC (rev 10398)
@@ -177,4 +177,5 @@
 test_cps = ['sys-apps/portage','virtual/portage']
 test_versions = ['1.0', '1.0-r1','2.3_p4','1.0_alpha57']
 test_slots = [ None, '1','gentoo-sources-2.6.17','spankywashere']
-test_usedeps = ['foo','-bar', ['foo','bar'],['foo','-bar'] ]
+test_usedeps = ['foo','-bar', ('foo','bar'),
+	('foo','-bar'), ('foo?', '-bar?') ]

Modified: main/trunk/pym/portage/tests/dep/test_dep_getusedeps.py
===================================================================
--- main/trunk/pym/portage/tests/dep/test_dep_getusedeps.py	2008-05-25 01:54:42 UTC (rev 10397)
+++ main/trunk/pym/portage/tests/dep/test_dep_getusedeps.py	2008-05-25 02:20:45 UTC (rev 10398)
@@ -24,7 +24,7 @@
 							cpv += version
 						if slot:
 							cpv += ":" + slot
-						if isinstance( use, list ):
+						if isinstance(use, tuple):
 							for u in use:
 								cpv = cpv + "[" + u + "]"
 							self.assertEqual( dep_getusedeps(
@@ -32,7 +32,7 @@
 						else:
 							if len(use):
 								self.assertEqual( dep_getusedeps(
-									cpv + "[" + use + "]" ), [use] )
+									cpv + "[" + use + "]" ), (use,) )
 							else:
 								self.assertEqual( dep_getusedeps(
-									cpv + "[" + use + "]" ), [] )
+									cpv + "[" + use + "]" ), () )

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-25  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-25  2:20 [gentoo-commits] portage r10398 - in main/trunk/pym/portage/tests: . dep Zac Medico (zmedico)

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