Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_array.py @ 66310:9fe76c26ea9f
#9424: Replace deprecated assert* methods in the Python test suite.
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Sat, 20 Nov 2010 19:04:17 +0000 |
| parents | fa8b57f987c5 |
| children | 48c40709417b |
line wrap: on
line diff
--- a/Lib/test/test_array.py Sat Nov 20 18:24:54 2010 +0000 +++ b/Lib/test/test_array.py Sat Nov 20 19:04:17 2010 +0000 @@ -238,9 +238,9 @@ def test_reduce_ex(self): a = array.array(self.typecode, self.example) for protocol in range(3): - self.assert_(a.__reduce_ex__(protocol)[0] is array.array) + self.assertIs(a.__reduce_ex__(protocol)[0], array.array) for protocol in range(3, pickle.HIGHEST_PROTOCOL): - self.assert_(a.__reduce_ex__(protocol)[0] is array_reconstructor) + self.assertIs(a.__reduce_ex__(protocol)[0], array_reconstructor) def test_pickle(self): for protocol in range(pickle.HIGHEST_PROTOCOL + 1): @@ -785,11 +785,11 @@ data.reverse() L[start:stop:step] = data a[start:stop:step] = array.array(self.typecode, data) - self.assertEquals(a, array.array(self.typecode, L)) + self.assertEqual(a, array.array(self.typecode, L)) del L[start:stop:step] del a[start:stop:step] - self.assertEquals(a, array.array(self.typecode, L)) + self.assertEqual(a, array.array(self.typecode, L)) def test_index(self): example = 2*self.example
