diff options
author | Alec Warner <antarus@gentoo.org> | 2007-02-01 05:50:08 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-02-01 05:50:08 +0000 |
commit | 309deebb24acbf457e8470d834dda14080c76dd2 (patch) | |
tree | e3384d269d179b811d40a4ed8649e705c58e1365 | |
parent | 11fff7a865f25fccf9d24086773b7410b9778cac (diff) | |
download | portage-309deebb24acbf457e8470d834dda14080c76dd2.tar.gz portage-309deebb24acbf457e8470d834dda14080c76dd2.tar.bz2 portage-309deebb24acbf457e8470d834dda14080c76dd2.zip |
fix regression in test changes
svn path=/main/trunk/; revision=5857
-rw-r--r-- | tests/portage/dep/test_dep_getcpv.py | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/tests/portage/dep/test_dep_getcpv.py b/tests/portage/dep/test_dep_getcpv.py index f1561ed78..11fd1a723 100644 --- a/tests/portage/dep/test_dep_getcpv.py +++ b/tests/portage/dep/test_dep_getcpv.py @@ -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 |