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

Method testSendto

Lib/test/test_timeout.py:239–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 self._sock_operation(100, 1.5, 'send', b"X" * 200000)
238
239 def testSendto(self):
240 # Test sendto() timeout
241 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
242 socket_helper.bind_port(serv, self.localhost)
243 serv.listen()
244 self.sock.connect(serv.getsockname())
245 # The address argument is ignored since we already connected.
246 self._sock_operation(100, 1.5, 'sendto', b"X" * 200000,
247 serv.getsockname())
248
249 def testSendall(self):
250 # Test sendall() timeout

Callers

nothing calls this directly

Calls 5

socketMethod · 0.80
_sock_operationMethod · 0.80
listenMethod · 0.45
connectMethod · 0.45
getsocknameMethod · 0.45

Tested by

no test coverage detected