(self)
| 459 | |
| 460 | @os_helper.skip_unless_working_chmod |
| 461 | def test_file_mode(self): |
| 462 | # _mkstemp_inner creates files with the proper mode |
| 463 | |
| 464 | file = self.do_create() |
| 465 | mode = stat.S_IMODE(os.stat(file.name).st_mode) |
| 466 | expected = 0o600 |
| 467 | if sys.platform == 'win32': |
| 468 | # There's no distinction among 'user', 'group' and 'world'; |
| 469 | # replicate the 'user' bits. |
| 470 | user = expected >> 6 |
| 471 | expected = user * (1 + 8 + 64) |
| 472 | self.assertEqual(mode, expected) |
| 473 | |
| 474 | @unittest.skipUnless(has_spawnl, 'os.spawnl not available') |
| 475 | @support.requires_subprocess() |
nothing calls this directly
no test coverage detected