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

Method _testCount

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

Source from the content-addressed store, hash-verified

6935 # count
6936
6937 def _testCount(self):
6938 address = self.serv.getsockname()
6939 file = open(os_helper.TESTFN, 'rb')
6940 sock = socket.create_connection(address,
6941 timeout=support.LOOPBACK_TIMEOUT)
6942 with sock, file:
6943 count = 5000007
6944 meth = self.meth_from_sock(sock)
6945 sent = meth(file, count=count)
6946 self.assertEqual(sent, count)
6947 self.assertEqual(file.tell(), count)
6948
6949 def testCount(self):
6950 count = 5000007

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected