[Python-checkins] python/dist/src/Lib/test test_socket.py,1.62,1.63
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Fri, 25 Apr 2003 08:11:27 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv25523
Modified Files:
test_socket.py
Log Message:
Skip testing inet_ntop() an inet_pton() if they aren't defined.
This makes the test pass on Windows again (and on other platforms
that don't have these).
Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** test_socket.py 25 Apr 2003 05:48:32 -0000 1.62
--- test_socket.py 25 Apr 2003 15:11:23 -0000 1.63
***************
*** 320,323 ****
--- 320,325 ----
def testIPv4toString(self):
+ if not hasattr(socket, 'inet_pton'):
+ return # No inet_pton() on this platform
from socket import inet_aton as f, inet_pton, AF_INET
g = lambda a: inet_pton(AF_INET, a)
***************
*** 333,336 ****
--- 335,340 ----
def testIPv6toString(self):
+ if not hasattr(socket, 'inet_pton'):
+ return # No inet_pton() on this platform
try:
from socket import inet_pton, AF_INET6, has_ipv6
***************
*** 350,353 ****
--- 354,359 ----
def testStringToIPv4(self):
+ if not hasattr(socket, 'inet_ntop'):
+ return # No inet_ntop() on this platform
from socket import inet_ntoa as f, inet_ntop, AF_INET
g = lambda a: inet_ntop(AF_INET, a)
***************
*** 363,366 ****
--- 369,374 ----
def testStringToIPv6(self):
+ if not hasattr(socket, 'inet_ntop'):
+ return # No inet_ntop() on this platform
try:
from socket import inet_ntop, AF_INET6, has_ipv6