MCPcopy Index your code
hub / github.com/RustPython/RustPython / _testCountWithOffset

Method _testCountWithOffset

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

Source from the content-addressed store, hash-verified

6874 # count + offset
6875
6876 def _testCountWithOffset(self):
6877 address = self.serv.getsockname()
6878 file = open(os_helper.TESTFN, 'rb')
6879 with socket.create_connection(address, timeout=2) as sock, file as file:
6880 count = 100007
6881 meth = self.meth_from_sock(sock)
6882 sent = meth(file, offset=2007, count=count)
6883 self.assertEqual(sent, count)
6884 self.assertEqual(file.tell(), count + 2007)
6885
6886 def testCountWithOffset(self):
6887 count = 100007

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