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

Method testRecvmsgIntoArray

Lib/test/test_socket.py:3939–3947  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3937 self.sendToServer(MSG)
3938
3939 def testRecvmsgIntoArray(self):
3940 # Receive into an array rather than the usual bytearray.
3941 buf = array.array("B", [0] * len(MSG))
3942 nbytes, ancdata, flags, addr = self.serv_sock.recvmsg_into([buf])
3943 self.assertEqual(nbytes, len(MSG))
3944 self.assertEqual(buf.tobytes(), MSG)
3945 self.checkRecvmsgAddress(addr, self.cli_addr)
3946 self.assertEqual(ancdata, [])
3947 self.checkFlags(flags, eor=True)
3948
3949 def _testRecvmsgIntoArray(self):
3950 self.sendToServer(MSG)

Callers

nothing calls this directly

Calls 4

recvmsg_intoMethod · 0.80
checkFlagsMethod · 0.80
assertEqualMethod · 0.45
checkRecvmsgAddressMethod · 0.45

Tested by

no test coverage detected