summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-10 12:50:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-10 12:50:49 +0000
commit2751871a9f691cbc1bcf4d983aadc6d166cb5a96 (patch)
tree38d424b3b24e4c6703c273b8f68ef58c6dc4e296 /tests
parentrework test import code, rename test_vercmp to be more generic, add tests for... (diff)
downloadportage-multirepo-2751871a9f691cbc1bcf4d983aadc6d166cb5a96.tar.gz
portage-multirepo-2751871a9f691cbc1bcf4d983aadc6d166cb5a96.tar.bz2
portage-multirepo-2751871a9f691cbc1bcf4d983aadc6d166cb5a96.zip
Make the tests pass.
svn path=/main/trunk/; revision=5523
Diffstat (limited to 'tests')
-rw-r--r--tests/test_atoms.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
index 499920f2..119b1fb3 100644
--- a/tests/test_atoms.py
+++ b/tests/test_atoms.py
@@ -21,23 +21,15 @@ class AtomCmpEqualGlob(TestCase):
# ("=sys-fs/udev_cvs*","sys-fs/udev_cvs_pre4" ) ]
for test in tests:
- try:
- self.failIf( len(match_from_list( test[0], test[1] )) < 1,
- msg="%s should match %s!" % (test[0], test[1]) )
- except TypeError:
- print "%s should match %s!" % (test[0], test[1])
- raise
+ self.failIf( len(match_from_list( test[0], [test[1]] )) != 1,
+ msg="%s should match %s!" % (test[0], test[1]) )
def testEqualGlobFail(self):
- tests = [ ("=sys-apps/portage*", "sys-apps/portage-2.1" ),
- ("=sys-apps/portage-*", "sys-apps/portage-2.1" ) ]
+ tests = [ ("=sys-apps/portage-2*", "sys-apps/portage-2.1" ),
+ ("=sys-apps/portage-2.1*", "sys-apps/portage-2.1.2" ) ]
for test in tests:
- try:
- self.failIf( len( match_from_list( test[0], test[1] ) ),
- msg="%s should match %s!" % (test[0], test[1]) )
- except TypeError:
- #TypeError means it died parsing, this is OK
- pass
+ self.failIf( len( match_from_list( test[0], [test[1]] ) ) != 1,
+ msg="%s should match %s!" % (test[0], test[1]) )
class VerCmpTestCase(TestCase):
""" A simple testCase for portage_versions.vercmp()