summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-15 16:59:06 +0000
committerGuido van Rossum <guido@python.org>2007-01-15 16:59:06 +0000
commit0944c0b6703ab120998f6ff021310713c8203e30 (patch)
tree11c553ef7700ed5cdfd388f0d0da96ca6a7143ae /Lib/test/test_socket.py
parentda85ee9db1c036d79df2109d3f0eee509bf306ff (diff)
downloadcpython-0944c0b6703ab120998f6ff021310713c8203e30.tar.gz
Rip out 'long' and 'L'-suffixed integer literals.
(Rough first cut.)
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index ecfb1ed3d5..1f26b4eb8a 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -302,17 +302,17 @@ class GeneralModuleTests(unittest.TestCase):
sizes = {socket.htonl: 32, socket.ntohl: 32,
socket.htons: 16, socket.ntohs: 16}
for func, size in sizes.items():
- mask = (1L<<size) - 1
+ mask = (1<<size) - 1
for i in (0, 1, 0xffff, ~0xffff, 2, 0x01234567, 0x76543210):
self.assertEqual(i & mask, func(func(i&mask)) & mask)
swapped = func(mask)
self.assertEqual(swapped & mask, mask)
- self.assertRaises(OverflowError, func, 1L<<34)
+ self.assertRaises(OverflowError, func, 1<<34)
def testNtoHErrors(self):
- good_values = [ 1, 2, 3, 1L, 2L, 3L ]
- bad_values = [ -1, -2, -3, -1L, -2L, -3L ]
+ good_values = [ 1, 2, 3, 1, 2, 3 ]
+ bad_values = [ -1, -2, -3, -1, -2, -3 ]
for k in good_values:
socket.ntohl(k)
socket.ntohs(k)