MCPcopy Index your code
hub / github.com/python/cpython / collect_test_socket

Function collect_test_socket

Lib/test/pythoninfo.py:742–756  ·  view source on GitHub ↗
(info_add)

Source from the content-addressed store, hash-verified

740
741
742def collect_test_socket(info_add):
743 import unittest
744 try:
745 from test import test_socket
746 except (ImportError, unittest.SkipTest):
747 return
748
749 # all check attributes like HAVE_SOCKET_CAN
750 attributes = [name for name in dir(test_socket)
751 if name.startswith('HAVE_')]
752 copy_attributes(info_add, test_socket, 'test_socket.%s', attributes)
753
754 # Get IOCTL_VM_SOCKETS_GET_LOCAL_CID of /dev/vsock
755 cid = test_socket.get_cid()
756 info_add('test_socket.get_cid', cid)
757
758
759def collect_support(info_add):

Callers

nothing calls this directly

Calls 2

copy_attributesFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…