From: Guido van Rossum Date: Wed, 31 Mar 2004 18:53:29 +0000 (+0000) Subject: When /tmp has certain sticky bits set, newly created subdirectories X-Git-Tag: v2.4a1~543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59db96f2a3e89ce4a3d309a6e5aa8b472e4e1cb1;p=python When /tmp has certain sticky bits set, newly created subdirectories inherit those bits, causing the test_mkdtemp.test_mode() test to fail. Remove those before comparing the actual mode to the expected mode. --- diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index d014ee83ac..83e2174f99 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -479,6 +479,7 @@ class test_mkdtemp(TC): dir = self.do_create() try: mode = stat.S_IMODE(os.stat(dir).st_mode) + mode &= 0777 # Mask off sticky bits inherited from /tmp expected = 0700 if sys.platform in ('win32', 'os2emx', 'mac'): # There's no distinction among 'user', 'group' and 'world';