(self)
| 3307 | self.assertEqual(cm.exception.errno, errno.EBADF) |
| 3308 | |
| 3309 | def test_cant_get_size(self): |
| 3310 | # Emulate a case where src file size cannot be determined. |
| 3311 | # Internally bufsize will be set to a small value and |
| 3312 | # a system call will be called repeatedly. |
| 3313 | with unittest.mock.patch('os.fstat', side_effect=OSError) as m: |
| 3314 | with self.get_files() as (src, dst): |
| 3315 | self.zerocopy_fun(src, dst) |
| 3316 | assert m.called |
| 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 |
nothing calls this directly
no test coverage detected