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

Method testRecvFromIntoArray

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

Source from the content-addressed store, hash-verified

6294 _testRecvIntoMemoryview = _testRecvIntoArray
6295
6296 def testRecvFromIntoArray(self):
6297 buf = array.array("B", [0] * len(MSG))
6298 nbytes, addr = self.cli_conn.recvfrom_into(buf)
6299 self.assertEqual(nbytes, len(MSG))
6300 buf = buf.tobytes()
6301 msg = buf[:len(MSG)]
6302 self.assertEqual(msg, MSG)
6303
6304 def _testRecvFromIntoArray(self):
6305 buf = bytes(MSG)

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
recvfrom_intoMethod · 0.45
assertEqualMethod · 0.45
tobytesMethod · 0.45

Tested by

no test coverage detected