MCPcopy Create free account
hub / github.com/RustPython/RustPython / _testWithTimeout

Method _testWithTimeout

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

Source from the content-addressed store, hash-verified

6909 # timeout (non-triggered)
6910
6911 def _testWithTimeout(self):
6912 address = self.serv.getsockname()
6913 file = open(os_helper.TESTFN, 'rb')
6914 sock = socket.create_connection(address,
6915 timeout=support.LOOPBACK_TIMEOUT)
6916 with sock, file:
6917 meth = self.meth_from_sock(sock)
6918 sent = meth(file)
6919 self.assertEqual(sent, self.FILESIZE)
6920
6921 def testWithTimeout(self):
6922 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