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

Method sendAncillaryIfPossible

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

Source from the content-addressed store, hash-verified

4212 len(MSG))
4213
4214 def sendAncillaryIfPossible(self, msg, ancdata):
4215 # Try to send msg and ancdata to server, but if the system
4216 # call fails, just send msg with no ancillary data.
4217 try:
4218 nbytes = self.sendmsgToServer([msg], ancdata)
4219 except OSError as e:
4220 # Check that it was the system call that failed
4221 self.assertIsInstance(e.errno, int)
4222 nbytes = self.sendmsgToServer([msg])
4223 self.assertEqual(nbytes, len(msg))
4224
4225 @unittest.skipIf(is_apple, "skipping, see issue #12958")
4226 def testFDPassEmpty(self):

Callers 3

_testFDPassEmptyMethod · 0.95
_testFDPassPartialIntMethod · 0.95

Calls 3

sendmsgToServerMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected