]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't use hex constants representing negative numbers.
authorGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 22:01:24 +0000 (22:01 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 12 Aug 2002 22:01:24 +0000 (22:01 +0000)
Lib/test/test_socket.py

index 3583d41b09804622ac23e58d4db1409c84fe4f5a..2f2ef63716f40e1dd1323034432daf1809a10c82 100644 (file)
@@ -249,7 +249,7 @@ class GeneralModuleTests(unittest.TestCase):
 
     def testNtoH(self):
         for func in socket.htonl, socket.ntohl:
-            for i in (0, 1, 0xffff0000, 2L):
+            for i in (0, 1, ~0xffff, 2L):
                 self.assertEqual(i, func(func(i)))
 
             biglong = 2**32L - 1