summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-12 15:06:02 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-12 15:06:02 +0000
commit2f970abe35172e0af65caccae4055a7bc7afa367 (patch)
tree127cae6bf8461ddf50c1e3e707e0782c1a7ac8e1
parent8a49f5fcb88430f795c102e85364c9f6d8078ed3 (diff)
downloadportage-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.py12
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 )