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

Method _testSendmsgExcessCmsgReject

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

Source from the content-addressed store, hash-verified

3477 self.assertEqual(self.serv_sock.recv(1000), b"done")
3478
3479 def _testSendmsgExcessCmsgReject(self):
3480 if not hasattr(socket, "CMSG_SPACE"):
3481 # Can only send one item
3482 with self.assertRaises(OSError) as cm:
3483 self.sendmsgToServer([MSG], [(0, 0, b""), (0, 0, b"")])
3484 self.assertIsNone(cm.exception.errno)
3485 self.sendToServer(b"done")
3486
3487 def testSendmsgAfterClose(self):
3488 # Check that sendmsg() fails on a closed socket.

Callers

nothing calls this directly

Calls 5

hasattrFunction · 0.85
sendmsgToServerMethod · 0.80
assertIsNoneMethod · 0.80
assertRaisesMethod · 0.45
sendToServerMethod · 0.45

Tested by

no test coverage detected