diff options
author | Benjamin Peterson <benjamin@python.org> | 2018-09-13 19:00:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 19:00:14 (GMT) |
commit | 84db4a9978069a98978e9cd7951d1a01d47e5286 (patch) | |
tree | 1c3d3c5cad796fe70371be89668eaf4431a3f23b /Lib/test/test_os.py | |
parent | 66755cbb1e529f54c9066639ebbbac81add0affd (diff) | |
download | cpython-84db4a9978069a98978e9cd7951d1a01d47e5286.zip cpython-84db4a9978069a98978e9cd7951d1a01d47e5286.tar.gz cpython-84db4a9978069a98978e9cd7951d1a01d47e5286.tar.bz2 |
closes bpo-34664: Only check file permission bits of newly created directories. (GH-9273)
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 0a8ba5c..6dbc255 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1131,8 +1131,8 @@ class MakedirTests(unittest.TestCase): 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') |