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

Method test_sendfile_ssl

Lib/test/test_asyncio/test_sendfile.py:362–371  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

360 self.assertEqual(self.file.tell(), 0)
361
362 def test_sendfile_ssl(self):
363 srv_proto, cli_proto = self.prepare_sendfile(is_ssl=True)
364 ret = self.run_loop(
365 self.loop.sendfile(cli_proto.transport, self.file))
366 cli_proto.transport.close()
367 self.run_loop(srv_proto.done)
368 self.assertEqual(ret, len(self.DATA))
369 self.assertEqual(srv_proto.nbytes, len(self.DATA))
370 self.assertEqual(srv_proto.data, self.DATA)
371 self.assertEqual(self.file.tell(), len(self.DATA))
372
373 def test_sendfile_for_closing_transp(self):
374 srv_proto, cli_proto = self.prepare_sendfile()

Callers

nothing calls this directly

Calls 6

prepare_sendfileMethod · 0.95
run_loopMethod · 0.45
sendfileMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected