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

Method _testOddCmsgSize

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

Source from the content-addressed store, hash-verified

4504
4505 @testOddCmsgSize.client_skip
4506 def _testOddCmsgSize(self):
4507 self.assertTrue(self.misc_event.wait(timeout=self.fail_timeout))
4508 try:
4509 nbytes = self.sendmsgToServer(
4510 [MSG],
4511 [(socket.IPPROTO_IPV6, socket.IPV6_TCLASS,
4512 array.array("i", [self.traffic_class]).tobytes() + b"\x00"),
4513 (socket.IPPROTO_IPV6, socket.IPV6_HOPLIMIT,
4514 array.array("i", [self.hop_limit]))])
4515 except OSError as e:
4516 self.assertIsInstance(e.errno, int)
4517 nbytes = self.sendmsgToServer(
4518 [MSG],
4519 [(socket.IPPROTO_IPV6, socket.IPV6_TCLASS,
4520 array.array("i", [self.traffic_class])),
4521 (socket.IPPROTO_IPV6, socket.IPV6_HOPLIMIT,
4522 array.array("i", [self.hop_limit]))])
4523 self.assertEqual(nbytes, len(MSG))
4524
4525 # Tests for proper handling of truncated ancillary data
4526

Callers

nothing calls this directly

Calls 7

lenFunction · 0.85
assertTrueMethod · 0.80
sendmsgToServerMethod · 0.80
assertIsInstanceMethod · 0.80
waitMethod · 0.45
tobytesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected