(self)
| 3249 | shutil.copyfile, TESTFN, TESTFN2) |
| 3250 | |
| 3251 | def test_exception_on_first_call(self): |
| 3252 | # Emulate a case where the first call to the zero-copy |
| 3253 | # function raises an exception in which case the function is |
| 3254 | # supposed to give up immediately. |
| 3255 | with unittest.mock.patch(self.PATCHPOINT, |
| 3256 | side_effect=OSError(errno.EINVAL, "yo")): |
| 3257 | with self.get_files() as (src, dst): |
| 3258 | with self.assertRaises(_GiveupOnFastCopy): |
| 3259 | self.zerocopy_fun(src, dst) |
| 3260 | |
| 3261 | def test_filesystem_full(self): |
| 3262 | # Emulate a case where filesystem is full and sendfile() fails |
nothing calls this directly
no test coverage detected