fix regression in test changes
authorAlec Warner <antarus@gentoo.org>
Thu, 1 Feb 2007 05:50:08 +0000 (05:50 -0000)
committerAlec Warner <antarus@gentoo.org>
Thu, 1 Feb 2007 05:50:08 +0000 (05:50 -0000)
svn path=/main/trunk/; revision=5857

tests/portage/dep/test_dep_getcpv.py

index f1561ed7827419a1b31998b7b55a498e088e438c..11fd1a72316715068cc7bbe2c872132aaaf72dfb 100644 (file)
@@ -18,15 +18,24 @@ class DepGetCPV(TestCase):
                bad_prefix_ops = [ ">~", "<~", "~>", "~<" ]
                postfix_ops = [ "*", "" ]
 
-               cpvs = ["sys-apps/portage", "sys-apps/portage-2.1", "sys-apps/portage-2.1:",
-                               "sys-apps/portage-2.1:2"]
-
+               cpvs = ["sys-apps/portage", "sys-apps/portage-2.1", "sys-apps/portage-2.1",
+                               "sys-apps/portage-2.1"]
+               slots = [None,":",":2"]
                for cpv in cpvs:
-                       for prefix in prefix_ops:
-                               for postfix in postfix_ops:
-                                       self.assertEqual( dep_getcpv( 
-                                               prefix + cpv + postfix ), cpv )
-                       for prefix in bad_prefix_ops:
-                               for postfix in postfix_ops:
-                                       self.assertNotEqual( dep_getcpv(
-                                               prefix + cpv + postfix ), cpv )
+                       for slot in slots:
+                               for prefix in prefix_ops:
+                                       for postfix in postfix_ops:
+                                               if slot:
+                                                       self.assertEqual( dep_getcpv( 
+                                                               prefix + cpv + slot + postfix ), cpv )
+                                               else:
+                                                       self.assertEqual( dep_getcpv( 
+                                                               prefix + cpv + postfix ), cpv )
+                               for prefix in bad_prefix_ops:
+                                       for postfix in postfix_ops:
+                                               if slot:
+                                                       self.assertNotEqual( dep_getcpv(
+                                                               prefix + cpv + slot + postfix ), cpv )
+                                               else:
+                                                       self.assertNotEqual( dep_getcpv(
+                                                               prefix + cpv + postfix ), cpv )
\ No newline at end of file