catch and validate new ValueError Exception
authorAlec Warner <antarus@gentoo.org>
Thu, 11 Jan 2007 21:29:50 +0000 (21:29 -0000)
committerAlec Warner <antarus@gentoo.org>
Thu, 11 Jan 2007 21:29:50 +0000 (21:29 -0000)
svn path=/main/trunk/; revision=5569

tests/portage_dep/test_isvalidatom.py

index 397b46c2efd5896c33ae07d3d6476bc6836c34a9..64b029391ac83e2b8eaffe3a27c68185a5786e98 100644 (file)
@@ -32,6 +32,9 @@ class IsValidAtom(TestCase):
                                atom_type = "valid"
                        else:
                                atom_type = "invalid"
-
-                       self.assertEqual( bool(isvalidatom( test[0] )), test[1],
-                               msg="isvalidatom(%s) != %s" % ( test[0], test[1] ) )
+                       try:
+                               self.assertEqual( bool(isvalidatom( test[0] )), test[1],
+                                       msg="isvalidatom(%s) != %s" % ( test[0], test[1] ) )
+                       except ValueError:
+                               if not test[1]:
+                                       pass