From 58eddb17a6e8d09862c101ea13aad5933784063e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 31 Mar 2004 18:55:17 +0000 Subject: [PATCH] Backport 1.17: 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. --- Lib/test/test_tempfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index 62127d8c3fb7..270587ed4044 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -473,6 +473,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'; -- 2.47.3