diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-12 15:06:02 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-12 15:06:02 +0000 |
commit | 2f970abe35172e0af65caccae4055a7bc7afa367 (patch) | |
tree | 127cae6bf8461ddf50c1e3e707e0782c1a7ac8e1 | |
parent | 8a49f5fcb88430f795c102e85364c9f6d8078ed3 (diff) | |
download | portage-2f970abe35172e0af65caccae4055a7bc7afa367.tar.gz portage-2f970abe35172e0af65caccae4055a7bc7afa367.tar.bz2 portage-2f970abe35172e0af65caccae4055a7bc7afa367.zip |
Fix bugs and poor assumptions.
svn path=/main/trunk/; revision=14227
-rw-r--r-- | pym/portage/tests/dep/test_dep_getslot.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pym/portage/tests/dep/test_dep_getslot.py b/pym/portage/tests/dep/test_dep_getslot.py index 61ea81586..925a03ffc 100644 --- a/pym/portage/tests/dep/test_dep_getslot.py +++ b/pym/portage/tests/dep/test_dep_getslot.py @@ -19,13 +19,11 @@ class DepGetSlot(TestCase): for cpv in cpvs: for version in versions: for slot in slots: - mycpv = cpv[:] + mycpv = cpv if version: - cpv += version - if slot: + mycpv = '=' + mycpv + '-' + version + if slot is not None: self.assertEqual( dep_getslot( - cpv + slot_char + slot ), slot ) + mycpv + slot_char + slot ), slot ) else: - self.assertEqual( dep_getslot( cpv ), slot ) - - self.assertEqual( dep_getslot( "sys-apps/portage:"), "" ) + self.assertEqual( dep_getslot( mycpv ), slot ) |