Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b599c61

Browse files
committed
Fix the unittest to run properly when the working directory has
additional bits set (such as the setgid or sticky bits).
1 parent 27b490c commit b599c61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_pathlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ def test_mkdir_parents(self):
15491549
self.assertTrue(p.is_dir())
15501550
if os.name != 'nt':
15511551
# the directory's permissions follow the mode argument
1552-
self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
1552+
self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o7555 & mode)
15531553
# the parent's permissions follow the default process settings
15541554
self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode)
15551555

0 commit comments

Comments
 (0)