Skip to content

Commit

Permalink
closes bpo-34664: Only check file permission bits of newly created di…
Browse files Browse the repository at this point in the history
…rectories. (GH-9273)
  • Loading branch information
benjaminp committed Sep 13, 2018
1 parent 66755cb commit 84db4a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_os.py
Expand Up @@ -1131,8 +1131,8 @@ def test_mode(self):
self.assertTrue(os.path.exists(path))
self.assertTrue(os.path.isdir(path))
if os.name != 'nt':
self.assertEqual(stat.S_IMODE(os.stat(path).st_mode), 0o555)
self.assertEqual(stat.S_IMODE(os.stat(parent).st_mode), 0o775)
self.assertEqual(os.stat(path).st_mode & 0o777, 0o555)
self.assertEqual(os.stat(parent).st_mode & 0o777, 0o775)

def test_exist_ok_existing_directory(self):
path = os.path.join(support.TESTFN, 'dir1')
Expand Down

0 comments on commit 84db4a9

Please sign in to comment.