Fix Fail test
authorAlec Warner <antarus@gentoo.org>
Wed, 10 Jan 2007 12:52:55 +0000 (12:52 -0000)
committerAlec Warner <antarus@gentoo.org>
Wed, 10 Jan 2007 12:52:55 +0000 (12:52 -0000)
svn path=/main/trunk/; revision=5524

tests/test_atoms.py

index 119b1fb3ca284a7369c26c60d9241ce396f496fd..d051fed22045a386f45d4899c3cd9e555411d40a 100644 (file)
@@ -28,8 +28,11 @@ class AtomCmpEqualGlob(TestCase):
                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:
-                       self.failIf( len( match_from_list( test[0], [test[1]] ) ) != 1,
-                               msg="%s should match %s!" % (test[0], test[1]) )
+                       try:
+                               self.failIf( len( match_from_list( test[0], [test[1]] ) ) != 1,
+                                       msg="%s shouldn't match %s!" % (test[0], test[1]) )
+                       except TypeError: # failure is ok here
+                               pass
 
 class VerCmpTestCase(TestCase):
        """ A simple testCase for portage_versions.vercmp()