closes bpo-34664: Only check file permission bits of newly created directories. (GH-9273)

This commit is contained in:
Benjamin Peterson 2018-09-13 12:00:14 -07:00 committed by GitHub
parent 66755cbb1e
commit 84db4a9978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1131,8 +1131,8 @@ class MakedirTests(unittest.TestCase):
self.assertTrue(os.path.exists(path)) self.assertTrue(os.path.exists(path))
self.assertTrue(os.path.isdir(path)) self.assertTrue(os.path.isdir(path))
if os.name != 'nt': if os.name != 'nt':
self.assertEqual(stat.S_IMODE(os.stat(path).st_mode), 0o555) self.assertEqual(os.stat(path).st_mode & 0o777, 0o555)
self.assertEqual(stat.S_IMODE(os.stat(parent).st_mode), 0o775) self.assertEqual(os.stat(parent).st_mode & 0o777, 0o775)
def test_exist_ok_existing_directory(self): def test_exist_ok_existing_directory(self):
path = os.path.join(support.TESTFN, 'dir1') path = os.path.join(support.TESTFN, 'dir1')