summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2004-03-31 18:53:29 (GMT)
committerGuido van Rossum <guido@python.org>2004-03-31 18:53:29 (GMT)
commit59db96f2a3e89ce4a3d309a6e5aa8b472e4e1cb1 (patch)
tree8addb4767b77e8ef655c3baf1827a6af97bf8b82
parent862b46bbc10a87eb2f4dc8bef80ab134d4d14a88 (diff)
downloadcpython-59db96f2a3e89ce4a3d309a6e5aa8b472e4e1cb1.zip
cpython-59db96f2a3e89ce4a3d309a6e5aa8b472e4e1cb1.tar.gz
cpython-59db96f2a3e89ce4a3d309a6e5aa8b472e4e1cb1.tar.bz2
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.
-rw-r--r--Lib/test/test_tempfile.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index d014ee8..83e2174 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';