[Python-Dev] test_socket.py failing
Barry A. Warsaw
barry@zope.com
Fri, 9 Nov 2001 14:53:01 -0500
>>>>> "BAW" == Barry A Warsaw <barry@zope.com> writes:
BAW> % ./python Lib/test/test_socket.py socket.error anthem
BAW> 192.168.1.2 anthem.wooz.org ['anthem', 'www.wooz.org', 'www']
BAW> ['192.168.1.2'] ['anthem.wooz.org', 'anthem', 'www.wooz.org',
BAW> 'www'] 23 Traceback (most recent call last):
| File "Lib/test/test_socket.py", line 104, in ?
| socket.getnameinfo(('x', 0, 0, 0), 0)
BAW> socket.error: IPv4 sockaddr must be 2 tuple
This patch "fixes" the test, but I'm not sure it's right.
-Barry
-------------------- snip snip --------------------
Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.21
diff -u -r1.21 test_socket.py
--- test_socket.py 2001/11/02 23:34:52 1.21
+++ test_socket.py 2001/11/09 19:52:32
@@ -102,7 +102,7 @@
try:
# On some versions, this crashes the interpreter.
socket.getnameinfo(('x', 0, 0, 0), 0)
-except socket.gaierror:
+except socket.error:
pass
canfork = hasattr(os, 'fork')