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

Method sendAncillaryIfPossible

Lib/test/test_socket.py:4111–4120  ·  view source on GitHub ↗
(self, msg, ancdata)

Source from the content-addressed store, hash-verified

4109 len(MSG))
4110
4111 def sendAncillaryIfPossible(self, msg, ancdata):
4112 # Try to send msg and ancdata to server, but if the system
4113 # call fails, just send msg with no ancillary data.
4114 try:
4115 nbytes = self.sendmsgToServer([msg], ancdata)
4116 except OSError as e:
4117 # Check that it was the system call that failed
4118 self.assertIsInstance(e.errno, int)
4119 nbytes = self.sendmsgToServer([msg])
4120 self.assertEqual(nbytes, len(msg))
4121
4122 @unittest.skipIf(is_apple, "skipping, see issue #12958")
4123 def testFDPassEmpty(self):

Callers 3

_testFDPassEmptyMethod · 0.95
_testFDPassPartialIntMethod · 0.95

Calls 4

lenFunction · 0.85
sendmsgToServerMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected