(self)
| 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 |
| 3334 | # the actual file size. Make sure a system call does not rely on |
| 3335 | # file size value except for (maybe) a better throughput / |
| 3336 | # performance. |
| 3337 | mock = unittest.mock.Mock() |
| 3338 | mock.st_size = self.FILESIZE + (100 * 1024 * 1024) |
| 3339 | with unittest.mock.patch('os.fstat', return_value=mock) as m: |
| 3340 | with self.get_files() as (src, dst): |
| 3341 | self.zerocopy_fun(src, dst) |
| 3342 | assert m.called |
| 3343 | self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA) |
| 3344 | |
| 3345 | def test_blocksize_arg(self): |
| 3346 | with unittest.mock.patch(self.PATCHPOINT, |
nothing calls this directly
no test coverage detected