diff options
author | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
commit | e2a383d062434c05b73031f0da57fe82b9da8942 (patch) | |
tree | 1a6fb6b2c056a10ee227dbc75855b3fac6153414 /Lib/test/test_array.py | |
parent | fc7bb8c786fd9cb3b1ab84e1976620d0ab545777 (diff) | |
download | cpython-e2a383d062434c05b73031f0da57fe82b9da8942.zip cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.gz cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.bz2 |
Rip out 'long' and 'L'-suffixed integer literals.
(Rough first cut.)
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-x | Lib/test/test_array.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 5c79b48..17d494c 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -61,7 +61,7 @@ class BaseTest(unittest.TestCase): bi = a.buffer_info() self.assert_(isinstance(bi, tuple)) self.assertEqual(len(bi), 2) - self.assert_(isinstance(bi[0], (int, long))) + self.assert_(isinstance(bi[0], (int, int))) self.assert_(isinstance(bi[1], int)) self.assertEqual(bi[1], len(a)) @@ -323,9 +323,9 @@ class BaseTest(unittest.TestCase): def test_getitem(self): a = array.array(self.typecode, self.example) self.assertEntryEqual(a[0], self.example[0]) - self.assertEntryEqual(a[0L], self.example[0]) + self.assertEntryEqual(a[0], self.example[0]) + self.assertEntryEqual(a[-1], self.example[-1]) self.assertEntryEqual(a[-1], self.example[-1]) - self.assertEntryEqual(a[-1L], self.example[-1]) self.assertEntryEqual(a[len(self.example)-1], self.example[-1]) self.assertEntryEqual(a[-len(self.example)], self.example[0]) self.assertRaises(TypeError, a.__getitem__) @@ -338,7 +338,7 @@ class BaseTest(unittest.TestCase): self.assertEntryEqual(a[0], a[-1]) a = array.array(self.typecode, self.example) - a[0L] = a[-1] + a[0] = a[-1] self.assertEntryEqual(a[0], a[-1]) a = array.array(self.typecode, self.example) @@ -346,7 +346,7 @@ class BaseTest(unittest.TestCase): self.assertEntryEqual(a[0], a[-1]) a = array.array(self.typecode, self.example) - a[-1L] = a[0] + a[-1] = a[0] self.assertEntryEqual(a[0], a[-1]) a = array.array(self.typecode, self.example) @@ -777,7 +777,7 @@ class NumberTest(BaseTest): self.assertEqual(a[3::-2], array.array(self.typecode, [3,1])) self.assertEqual(a[-100:100:], a) self.assertEqual(a[100:-100:-1], a[::-1]) - self.assertEqual(a[-100L:100L:2L], array.array(self.typecode, [0,2,4])) + self.assertEqual(a[-100:100:2], array.array(self.typecode, [0,2,4])) self.assertEqual(a[1000:2000:2], array.array(self.typecode, [])) self.assertEqual(a[-1000:-2000:-2], array.array(self.typecode, [])) @@ -863,8 +863,8 @@ class SignedNumberTest(NumberTest): def test_overflow(self): a = array.array(self.typecode) - lower = -1 * long(pow(2, a.itemsize * 8 - 1)) - upper = long(pow(2, a.itemsize * 8 - 1)) - 1L + lower = -1 * int(pow(2, a.itemsize * 8 - 1)) + upper = int(pow(2, a.itemsize * 8 - 1)) - 1 self.check_overflow(lower, upper) class UnsignedNumberTest(NumberTest): @@ -876,7 +876,7 @@ class UnsignedNumberTest(NumberTest): def test_overflow(self): a = array.array(self.typecode) lower = 0 - upper = long(pow(2, a.itemsize * 8)) - 1L + upper = int(pow(2, a.itemsize * 8)) - 1 self.check_overflow(lower, upper) |