(self)
| 406 | self.fdopen_helper('r', 100) |
| 407 | |
| 408 | def test_replace(self): |
| 409 | TESTFN2 = os_helper.TESTFN + ".2" |
| 410 | self.addCleanup(os_helper.unlink, os_helper.TESTFN) |
| 411 | self.addCleanup(os_helper.unlink, TESTFN2) |
| 412 | |
| 413 | create_file(os_helper.TESTFN, b"1") |
| 414 | create_file(TESTFN2, b"2") |
| 415 | |
| 416 | os.replace(os_helper.TESTFN, TESTFN2) |
| 417 | self.assertRaises(FileNotFoundError, os.stat, os_helper.TESTFN) |
| 418 | with open(TESTFN2, 'r', encoding='utf-8') as f: |
| 419 | self.assertEqual(f.read(), "1") |
| 420 | |
| 421 | def test_open_keywords(self): |
| 422 | f = os.open(path=__file__, flags=os.O_RDONLY, mode=0o777, |
nothing calls this directly
no test coverage detected