Lines Matching defs:sendfile
133 if not hasattr(os, "sendfile"):
148 os.sendfile(outfd, infd, 0, 2)
2496 # Emulate a case where filesystem is full and sendfile() fails
2504 @unittest.skipIf(not SUPPORTS_SENDFILE, 'os.sendfile() not supported')
2506 PATCHPOINT = "os.sendfile"
2530 def sendfile(*args, **kwargs):
2538 orig_sendfile = os.sendfile
2539 with unittest.mock.patch('os.sendfile', create=True,
2540 side_effect=sendfile):
2550 # sendfile() will be called repeatedly.
2559 # actual file size. We want to force sendfile() to be called
2572 # the actual file size. Make sure sendfile() does not rely on
2584 with unittest.mock.patch('os.sendfile',
2590 # sendfile() are the same.
2602 # Emulate a case where sendfile() only support file->socket