summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-04-11 16:16:01 -0700
committerZac Medico <zmedico@gentoo.org>2010-04-11 16:16:01 -0700
commitfba0e6096498a79d3d7f2908580e13acbe61f9bc (patch)
tree017cfef6f02ee520c7f033f69444fed4ba668696
parentc37319fac1e0ff59930ab3ff3bd468b27a5a1346 (diff)
downloadportage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.tar.gz
portage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.tar.bz2
portage-fba0e6096498a79d3d7f2908580e13acbe61f9bc.zip
Use assertFalse insead of failIf since failIf is deprecated in python 3.2.
-rw-r--r--pym/portage/tests/util/test_uniqueArray.py2
-rw-r--r--pym/portage/tests/util/test_varExpand.py12
-rw-r--r--pym/portage/tests/versions/test_vercmp.py8
3 files changed, 11 insertions, 11 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 ) )
diff --git a/pym/portage/tests/versions/test_vercmp.py b/pym/portage/tests/versions/test_vercmp.py
index 23e7dd575..aa7969ce8 100644
--- a/pym/portage/tests/versions/test_vercmp.py
+++ b/pym/portage/tests/versions/test_vercmp.py
@@ -24,7 +24,7 @@ class VerCmpTestCase(TestCase):
("12.2.5", "12.2b"),
]
for test in tests:
- self.failIf( vercmp( test[0], test[1] ) <= 0, msg="%s < %s? Wrong!" % (test[0],test[1]) )
+ self.assertFalse( vercmp( test[0], test[1] ) <= 0, msg="%s < %s? Wrong!" % (test[0],test[1]) )
def testVerCmpLess(self):
"""
@@ -47,7 +47,7 @@ class VerCmpTestCase(TestCase):
("12.2b", "12.2.5"),
]
for test in tests:
- self.failIf( vercmp( test[0], test[1]) >= 0, msg="%s > %s? Wrong!" % (test[0],test[1]))
+ self.assertFalse( vercmp( test[0], test[1]) >= 0, msg="%s > %s? Wrong!" % (test[0],test[1]))
def testVerCmpEqual(self):
@@ -59,7 +59,7 @@ class VerCmpTestCase(TestCase):
("1.0-r0", "1.0-r0"),
("1.0-r1", "1.0-r1")]
for test in tests:
- self.failIf( vercmp( test[0], test[1]) != 0, msg="%s != %s? Wrong!" % (test[0],test[1]))
+ self.assertFalse( vercmp( test[0], test[1]) != 0, msg="%s != %s? Wrong!" % (test[0],test[1]))
def testVerNotEqual(self):
@@ -77,4 +77,4 @@ class VerCmpTestCase(TestCase):
("12.2b", "12.2"),
]
for test in tests:
- self.failIf( vercmp( test[0], test[1]) == 0, msg="%s == %s? Wrong!" % (test[0],test[1]))
+ self.assertFalse( vercmp( test[0], test[1]) == 0, msg="%s == %s? Wrong!" % (test[0],test[1]))