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

Method _testWithTimeout

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

Source from the content-addressed store, hash-verified

7012 # timeout (non-triggered)
7013
7014 def _testWithTimeout(self):
7015 address = self.serv.getsockname()
7016 file = open(os_helper.TESTFN, 'rb')
7017 sock = socket.create_connection(address,
7018 timeout=support.LOOPBACK_TIMEOUT)
7019 with sock, file:
7020 meth = self.meth_from_sock(sock)
7021 sent = meth(file)
7022 self.assertEqual(sent, self.FILESIZE)
7023
7024 def testWithTimeout(self):
7025 conn = self.accept_conn()

Callers

nothing calls this directly

Calls 6

meth_from_sockMethod · 0.95
methFunction · 0.85
openFunction · 0.50
getsocknameMethod · 0.45
create_connectionMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected