mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Allow absent fromfd(), for Windows.
This commit is contained in:
parent
733632ac1f
commit
6fb3d5ee92
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue