]> granicus.if.org Git - python/commitdiff
Fix the unittest to run properly when the working directory has
authorGregory P. Smith <greg@krypto.org>
Mon, 20 Jan 2014 09:10:33 +0000 (01:10 -0800)
committerGregory P. Smith <greg@krypto.org>
Mon, 20 Jan 2014 09:10:33 +0000 (01:10 -0800)
additional bits set (such as the setgid or sticky bits).

Lib/test/test_pathlib.py

index a54eef5e9cdde35e174735eec9e74e2fa4c0b30b..2268f94a725cfb7d4cc98c49c166e18395bdc07e 100644 (file)
@@ -1549,7 +1549,7 @@ class _BasePathTest(object):
         self.assertTrue(p.is_dir())
         if os.name != 'nt':
             # the directory's permissions follow the mode argument
-            self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
+            self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o7555 & mode)
         # the parent's permissions follow the default process settings
         self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode)