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

Method testRecvIntoArray

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

Source from the content-addressed store, hash-verified

6264 SocketConnectedTest.__init__(self, methodName=methodName)
6265
6266 def testRecvIntoArray(self):
6267 buf = array.array("B", [0] * len(MSG))
6268 nbytes = self.cli_conn.recv_into(buf)
6269 self.assertEqual(nbytes, len(MSG))
6270 buf = buf.tobytes()
6271 msg = buf[:len(MSG)]
6272 self.assertEqual(msg, MSG)
6273
6274 def _testRecvIntoArray(self):
6275 buf = bytes(MSG)

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
recv_intoMethod · 0.45
assertEqualMethod · 0.45
tobytesMethod · 0.45

Tested by

no test coverage detected