From: Guido van Rossum Date: Wed, 12 Jun 2002 20:48:59 +0000 (+0000) Subject: Allow absent fromfd(), for Windows. X-Git-Tag: v2.3c1~5365 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fb3d5ee926fc11a2b0f686468a012b0b7b256a4;p=python Allow absent fromfd(), for Windows. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 8649a6b332..39d3130c8a 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -323,6 +323,8 @@ class BasicTCPTest(SocketConnectedTest): def testFromFd(self): """Testing fromfd().""" + if not hasattr(socket, fromfd): + return # On Windows, this doesn't exist fd = self.cli_conn.fileno() sock = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM) msg = sock.recv(1024)