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

Method testRecvmsgIntoGenerator

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

Source from the content-addressed store, hash-verified

3923 self.sendToServer(MSG)
3924
3925 def testRecvmsgIntoGenerator(self):
3926 # Receive into buffer obtained from a generator (not a sequence).
3927 buf = bytearray(len(MSG))
3928 nbytes, ancdata, flags, addr = self.serv_sock.recvmsg_into(
3929 (o for o in [buf]))
3930 self.assertEqual(nbytes, len(MSG))
3931 self.assertEqual(buf, bytearray(MSG))
3932 self.checkRecvmsgAddress(addr, self.cli_addr)
3933 self.assertEqual(ancdata, [])
3934 self.checkFlags(flags, eor=True)
3935
3936 def _testRecvmsgIntoGenerator(self):
3937 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