(self)
| 440 | |
| 441 | @os_helper.skip_unless_working_chmod |
| 442 | def test_file_mode(self): |
| 443 | # _mkstemp_inner creates files with the proper mode |
| 444 | |
| 445 | file = self.do_create() |
| 446 | mode = stat.S_IMODE(os.stat(file.name).st_mode) |
| 447 | expected = 0o600 |
| 448 | if sys.platform == 'win32': |
| 449 | # There's no distinction among 'user', 'group' and 'world'; |
| 450 | # replicate the 'user' bits. |
| 451 | user = expected >> 6 |
| 452 | expected = user * (1 + 8 + 64) |
| 453 | self.assertEqual(mode, expected) |
| 454 | |
| 455 | @unittest.skipUnless(has_spawnl, 'os.spawnl not available') |
| 456 | @support.requires_subprocess() |
nothing calls this directly
no test coverage detected