convert old fail* assertions to assert*

This commit is contained in:
Benjamin Peterson 2009-06-30 23:06:06 +00:00
parent 98d23f2e06
commit c9c0f201fe
275 changed files with 4540 additions and 4540 deletions

View file

@ -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()