From: Guido van Rossum Date: Mon, 12 Aug 2002 22:01:24 +0000 (+0000) Subject: Don't use hex constants representing negative numbers. X-Git-Tag: v2.3c1~4518 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=558fc977c5eea1af25fca4bf7f28a41756ba2ad6;p=thirdparty%2FPython%2Fcpython.git Don't use hex constants representing negative numbers. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 3583d41b0980..2f2ef63716f4 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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