(self)
| 3317 | self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA) |
| 3318 | |
| 3319 | def test_small_chunks(self): |
| 3320 | # Force internal file size detection to be smaller than the |
| 3321 | # actual file size. We want to force a system call to be called |
| 3322 | # multiple times, also in order to emulate a src fd which gets |
| 3323 | # bigger while it is being copied. |
| 3324 | mock = unittest.mock.Mock() |
| 3325 | mock.st_size = 65536 + 1 |
| 3326 | with unittest.mock.patch('os.fstat', return_value=mock) as m: |
| 3327 | with self.get_files() as (src, dst): |
| 3328 | self.zerocopy_fun(src, dst) |
| 3329 | assert m.called |
| 3330 | self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA) |
| 3331 | |
| 3332 | def test_big_chunk(self): |
| 3333 | # Force internal file size detection to be +100MB bigger than |
nothing calls this directly
no test coverage detected