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()