MCPcopy Index your code
hub / github.com/RustPython/RustPython / _have_socket_bluetooth_l2cap

Function _have_socket_bluetooth_l2cap

Lib/test/test_socket.py:184–192  ·  view source on GitHub ↗

Check whether BTPROTO_L2CAP sockets are supported on this host.

()

Source from the content-addressed store, hash-verified

182
183
184def _have_socket_bluetooth_l2cap():
185 """Check whether BTPROTO_L2CAP sockets are supported on this host."""
186 try:
187 s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, socket.BTPROTO_L2CAP)
188 except (AttributeError, OSError):
189 return False
190 else:
191 s.close()
192 return True
193
194
195def _have_socket_hyperv():

Callers 1

test_socket.pyFile · 0.85

Calls 2

socketMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected