summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/portage/dep/test_dep_getcpv.py3
-rw-r--r--tests/portage/dep/test_get_operator.py15
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/portage/dep/test_dep_getcpv.py b/tests/portage/dep/test_dep_getcpv.py
index 857a408a3..f1561ed78 100644
--- a/tests/portage/dep/test_dep_getcpv.py
+++ b/tests/portage/dep/test_dep_getcpv.py
@@ -18,7 +18,8 @@ class DepGetCPV(TestCase):
bad_prefix_ops = [ ">~", "<~", "~>", "~<" ]
postfix_ops = [ "*", "" ]
- cpvs = ["sys-apps/portage"]
+ cpvs = ["sys-apps/portage", "sys-apps/portage-2.1", "sys-apps/portage-2.1:",
+ "sys-apps/portage-2.1:2"]
for cpv in cpvs:
for prefix in prefix_ops:
diff --git a/tests/portage/dep/test_get_operator.py b/tests/portage/dep/test_get_operator.py
index 28485e0f0..b41fab0d5 100644
--- a/tests/portage/dep/test_get_operator.py
+++ b/tests/portage/dep/test_get_operator.py
@@ -16,11 +16,16 @@ class GetOperator(TestCase):
( ">~", ">" ), ("~<", "~"), ( "=~", "=" ),
( "=>", "=" ), ("=<", "=") ]
- testCP = "sys-apps/portage"
-
- for test in tests:
- result = get_operator( test[0] + testCP )
- self.assertEqual( result, test[1] )
+ test_cpvs = ["sys-apps/portage","sys-apps/portage-2.1"]
+ slots = [ None,"1","linux-2.5.6" ]
+ for cpv in test_cpvs:
+ for test in tests:
+ for slot in slots:
+ atom = cpv[:]
+ if slot:
+ atom += ":" + slot
+ result = get_operator( test[0] + atom )
+ self.assertEqual( result, test[1] )
result = get_operator( "=sys-apps/portage*" )
self.assertEqual( result , "=*" )