Allow absent fromfd(), for Windows.
This commit is contained in:
parent
733632ac1f
commit
6fb3d5ee92
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue