[Python-checkins] python/dist/src/Lib/test test_socket.py,1.55,1.56
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Mon, 12 Aug 2002 15:01:27 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv22584
Modified Files:
test_socket.py
Log Message:
Don't use hex constants representing negative numbers.
Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** test_socket.py 8 Aug 2002 20:28:34 -0000 1.55
--- test_socket.py 12 Aug 2002 22:01:24 -0000 1.56
***************
*** 250,254 ****
def testNtoH(self):
for func in socket.htonl, socket.ntohl:
! for i in (0, 1, 0xffff0000, 2L):
self.assertEqual(i, func(func(i)))
--- 250,254 ----
def testNtoH(self):
for func in socket.htonl, socket.ntohl:
! for i in (0, 1, ~0xffff, 2L):
self.assertEqual(i, func(func(i)))