diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-04-11 16:16:01 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-04-11 16:16:01 -0700 |
commit | fba0e6096498a79d3d7f2908580e13acbe61f9bc (patch) | |
tree | 017cfef6f02ee520c7f033f69444fed4ba668696 /pym/portage/tests/util | |
parent | c37319fac1e0ff59930ab3ff3bd468b27a5a1346 (diff) | |
download | portage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.tar.gz portage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.tar.bz2 portage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.zip |
Use assertFalse insead of failIf since failIf is deprecated in python 3.2.
Diffstat (limited to 'pym/portage/tests/util')
-rw-r--r-- | pym/portage/tests/util/test_uniqueArray.py | 2 | ||||
-rw-r--r-- | pym/portage/tests/util/test_varExpand.py | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pym/portage/tests/util/test_uniqueArray.py b/pym/portage/tests/util/test_uniqueArray.py index 34daaf23c..2a1a20929 100644 --- a/pym/portage/tests/util/test_uniqueArray.py +++ b/pym/portage/tests/util/test_uniqueArray.py @@ -20,5 +20,5 @@ class UniqueArrayTestCase(TestCase): result = unique_array( test[0] ) for item in test[1]: number = result.count(item) - self.failIf( number is not 1, msg="%s contains %s of %s, \ + self.assertFalse( number is not 1, msg="%s contains %s of %s, \ should be only 1" % (result, number, item) ) diff --git a/pym/portage/tests/util/test_varExpand.py b/pym/portage/tests/util/test_varExpand.py index 1c2500dbd..30aa390bf 100644 --- a/pym/portage/tests/util/test_varExpand.py +++ b/pym/portage/tests/util/test_varExpand.py @@ -13,11 +13,11 @@ class VarExpandTestCase(TestCase): for key in varDict: result = varexpand( "$%s" % key, varDict ) - self.failIf( result != varDict[key], + self.assertFalse( result != varDict[key], msg="Got %s != %s, from varexpand( %s, %s )" % \ ( result, varDict[key], "$%s" % key, varDict ) ) result = varexpand( "${%s}" % key, varDict ) - self.failIf( result != varDict[key], + self.assertFalse( result != varDict[key], msg="Got %s != %s, from varexpand( %s, %s )" % \ ( result, varDict[key], "${%s}" % key, varDict ) ) @@ -27,7 +27,7 @@ class VarExpandTestCase(TestCase): tests = [ ("\"${a}\"", "\"5\"") ] for test in tests: result = varexpand( test[0], varDict ) - self.failIf( result != test[1], + self.assertFalse( result != test[1], msg="Got %s != %s from varexpand( %s, %s )" \ % ( result, test[1], test[0], varDict ) ) @@ -37,7 +37,7 @@ class VarExpandTestCase(TestCase): tests = [ ("\'${a}\'", "\'${a}\'") ] for test in tests: result = varexpand( test[0], varDict ) - self.failIf( result != test[1], + self.assertFalse( result != test[1], msg="Got %s != %s from varexpand( %s, %s )" \ % ( result, test[1], test[0], varDict ) ) @@ -49,11 +49,11 @@ class VarExpandTestCase(TestCase): for var in testVars: result = varexpand( "$%s" % var, varDict ) - self.failIf( len(result), + self.assertFalse( len(result), msg="Got %s == %s, from varexpand( %s, %s )" \ % ( result, var, "$%s" % var, varDict ) ) result = varexpand( "${%s}" % var, varDict ) - self.failIf( len(result), + self.assertFalse( len(result), msg="Got %s == %s, from varexpand( %s, %s )" \ % ( result, var, "${%s}" % var, varDict ) ) |