summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tuple.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_tuple.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_tuple.py')
-rw-r--r--Lib/test/test_tuple.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py
index f82af31..c37adc2 100644
--- a/Lib/test/test_tuple.py
+++ b/Lib/test/test_tuple.py
@@ -11,7 +11,7 @@ class TupleTest(seq_tests.CommonTest):
self.assertEqual(tuple(), ())
t0_3 = (0, 1, 2, 3)
t0_3_bis = tuple(t0_3)
- self.assert_(t0_3 is t0_3_bis)
+ self.assertTrue(t0_3 is t0_3_bis)
self.assertEqual(tuple([]), ())
self.assertEqual(tuple([0, 1, 2, 3]), (0, 1, 2, 3))
self.assertEqual(tuple(''), ())
@@ -19,8 +19,8 @@ class TupleTest(seq_tests.CommonTest):
def test_truth(self):
super().test_truth()
- self.assert_(not ())
- self.assert_((42, ))
+ self.assertTrue(not ())
+ self.assertTrue((42, ))
def test_len(self):
super().test_len()
@@ -33,14 +33,14 @@ class TupleTest(seq_tests.CommonTest):
u = (0, 1)
u2 = u
u += (2, 3)
- self.assert_(u is not u2)
+ self.assertTrue(u is not u2)
def test_imul(self):
super().test_imul()
u = (0, 1)
u2 = u
u *= 3
- self.assert_(u is not u2)
+ self.assertTrue(u is not u2)
def test_tupleresizebug(self):
# Check that a specific bug in _PyTuple_Resize() is squashed.
@@ -71,7 +71,7 @@ class TupleTest(seq_tests.CommonTest):
inps = base + [(i, j) for i in base for j in xp] + \
[(i, j) for i in xp for j in base] + xp + list(zip(base))
collisions = len(inps) - len(set(map(hash, inps)))
- self.assert_(collisions <= 15)
+ self.assertTrue(collisions <= 15)
def test_repr(self):
l0 = tuple()