Skip to content

Commit a563a78

Browse files
committed
Add docs to unit testing
1 parent 59c31b3 commit a563a78

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_socket.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6809,6 +6809,8 @@ def check_pipes_connected(self, wds, rds):
68096809
self.assertEqual(data, str(index).encode())
68106810

68116811
def testSendAndRecvFds(self):
6812+
"""basic test over a local socket pair"""
6813+
68126814
# use a UNIX socket pair to exchange file descriptors locally
68136815
sock1, sock2 = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
68146816
with sock1, sock2:
@@ -6828,6 +6830,8 @@ def testSendAndRecvFds(self):
68286830
self.check_pipes_connected(self.wds, rds2)
68296831

68306832
def testRecvFlags(self):
6833+
"""same as testSendAndRecvFds but set recv_fds flags to MSG_PEEK"""
6834+
68316835
# use a UNIX socket pair to exchange file descriptors locally
68326836
# set to non blocking to avoid hangs on errors
68336837
with socket_setdefaulttimeout(0):
@@ -6875,6 +6879,9 @@ def testRecvFlags(self):
68756879
)
68766880

68776881
def testSendAddress(self):
6882+
"""test receiving a DGRAM over a bound socket, sending with the
6883+
'address' argument of send_fds"""
6884+
68786885
# create a bound socket and use a second unbound socket to test
68796886
# the address parameter of send_fds
68806887
with (

0 commit comments

Comments
 (0)