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

Method testSend

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

Source from the content-addressed store, hash-verified

228 self._sock_operation(1, 1.5, 'accept')
229
230 def testSend(self):
231 # Test send() timeout
232 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
233 socket_helper.bind_port(serv, self.localhost)
234 serv.listen()
235 self.sock.connect(serv.getsockname())
236 # Send a lot of data in order to bypass buffering in the TCP stack.
237 self._sock_operation(100, 1.5, 'send', b"X" * 200000)
238
239 def testSendto(self):
240 # Test sendto() 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