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

Method testLoopback

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

Source from the content-addressed store, hash-verified

2246 @unittest.skipUnless(hasattr(socket, "CAN_RAW_LOOPBACK"),
2247 'socket.CAN_RAW_LOOPBACK required for this test.')
2248 def testLoopback(self):
2249 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
2250 for loopback in (0, 1):
2251 s.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_LOOPBACK,
2252 loopback)
2253 self.assertEqual(loopback,
2254 s.getsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_LOOPBACK))
2255
2256 @unittest.skipUnless(hasattr(socket, "CAN_RAW_FILTER"),
2257 'socket.CAN_RAW_FILTER required for this test.')

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
setsockoptMethod · 0.45
assertEqualMethod · 0.45
getsockoptMethod · 0.45

Tested by

no test coverage detected