Skip to content

Commit cbf38e7

Browse files
Not all socket functions are available on all platforms
1 parent f519333 commit cbf38e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_inspect/test_inspect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6318,12 +6318,13 @@ def test_socket_module_has_signatures(self):
63186318
no_signature = {'SocketType'}
63196319
# The C default is NULL and None is not accepted
63206320
unsupported_signature = {'getservbyname', 'getservbyport'}
6321+
# Not all functions and methods are available on all platforms.
6322+
unsupported_signature &= vars(socket).keys()
63216323
# These cannot be converted to Argument Clinic: their behaviour
63226324
# depends on the number of the arguments.
63236325
methods_no_signature = {'ioctl', 'sendto', 'setsockopt'}
63246326
# These have parameters with unrepresentable default values.
63256327
methods_unsupported_signature = {'listen', 'sendmsg', 'sendmsg_afalg'}
6326-
# Not all methods are available on all platforms.
63276328
defined = vars(socket.SocketType).keys()
63286329
self._test_module_has_signatures(socket,
63296330
no_signature, unsupported_signature,

0 commit comments

Comments
 (0)