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

Method _testCountSmall

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

Source from the content-addressed store, hash-verified

6956 # count small
6957
6958 def _testCountSmall(self):
6959 address = self.serv.getsockname()
6960 file = open(os_helper.TESTFN, 'rb')
6961 sock = socket.create_connection(address,
6962 timeout=support.LOOPBACK_TIMEOUT)
6963 with sock, file:
6964 count = 1
6965 meth = self.meth_from_sock(sock)
6966 sent = meth(file, count=count)
6967 self.assertEqual(sent, count)
6968 self.assertEqual(file.tell(), count)
6969
6970 def testCountSmall(self):
6971 count = 1

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