summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_richcmp.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-30 23:06:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-30 23:06:06 (GMT)
commitc9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch)
tree6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_richcmp.py
parent98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff)
downloadcpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.zip
cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz
cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.bz2
convert old fail* assertions to assert*
Diffstat (limited to 'Lib/test/test_richcmp.py')
-rw-r--r--Lib/test/test_richcmp.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py
index 72e636d..a788c60 100644
--- a/Lib/test/test_richcmp.py
+++ b/Lib/test/test_richcmp.py
@@ -106,7 +106,7 @@ class VectorTest(unittest.TestCase):
self.assertEqual(len(realres), len(expres))
for i in range(len(realres)):
# results are bool, so we can use "is" here
- self.assert_(realres[i] is expres[i])
+ self.assertTrue(realres[i] is expres[i])
def test_mixed(self):
# check that comparisons involving Vector objects
@@ -163,7 +163,7 @@ class NumberTest(unittest.TestCase):
for op in opmap[opname]:
realres = op(ta, tb)
realres = getattr(realres, "x", realres)
- self.assert_(realres is expres)
+ self.assertTrue(realres is expres)
def test_values(self):
# check all operators and all comparison results
@@ -237,8 +237,8 @@ class MiscTest(unittest.TestCase):
b.append(17)
# Even recursive lists of different lengths are different,
# but they cannot be ordered
- self.assert_(not (a == b))
- self.assert_(a != b)
+ self.assertTrue(not (a == b))
+ self.assertTrue(a != b)
self.assertRaises(RuntimeError, operator.lt, a, b)
self.assertRaises(RuntimeError, operator.le, a, b)
self.assertRaises(RuntimeError, operator.gt, a, b)
@@ -248,9 +248,9 @@ class MiscTest(unittest.TestCase):
self.assertRaises(RuntimeError, operator.ne, a, b)
a.insert(0, 11)
b.insert(0, 12)
- self.assert_(not (a == b))
- self.assert_(a != b)
- self.assert_(a < b)
+ self.assertTrue(not (a == b))
+ self.assertTrue(a != b)
+ self.assertTrue(a < b)
class DictTest(unittest.TestCase):
@@ -272,7 +272,7 @@ class DictTest(unittest.TestCase):
self.assertEqual(imag1a, imag1a)
self.assertEqual(imag1a, imag1b)
self.assertEqual(imag2, imag2)
- self.assert_(imag1a != imag2)
+ self.assertTrue(imag1a != imag2)
for opname in ("lt", "le", "gt", "ge"):
for op in opmap[opname]:
self.assertRaises(TypeError, op, imag1a, imag2)
@@ -280,7 +280,7 @@ class DictTest(unittest.TestCase):
class ListTest(unittest.TestCase):
def assertIs(self, a, b):
- self.assert_(a is b)
+ self.assertTrue(a is b)
def test_coverage(self):
# exercise all comparisons for lists