mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
This commit is contained in:
parent
ef82be368a
commit
ab91fdef1f
274 changed files with 4538 additions and 4538 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue