(self)
| 3281 | self.assertEqual(cm.exception.errno, errno.EBADF) |
| 3282 | |
| 3283 | def test_cant_get_size(self): |
| 3284 | # Emulate a case where src file size cannot be determined. |
| 3285 | # Internally bufsize will be set to a small value and |
| 3286 | # a system call will be called repeatedly. |
| 3287 | with unittest.mock.patch('os.fstat', side_effect=OSError) as m: |
| 3288 | with self.get_files() as (src, dst): |
| 3289 | self.zerocopy_fun(src, dst) |
| 3290 | assert m.called |
| 3291 | self.assertEqual(read_file(TESTFN2, binary=True), self.FILEDATA) |
| 3292 | |
| 3293 | def test_small_chunks(self): |
| 3294 | # Force internal file size detection to be smaller than the |
nothing calls this directly
no test coverage detected