summaryrefslogtreecommitdiff
path: root/Lib/test/test_tempfile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2004-03-31 18:53:29 +0000
committerGuido van Rossum <guido@python.org>2004-03-31 18:53:29 +0000
commit8da2c5bd974b07cf15995e483aac3093971468b1 (patch)
tree980604fb48dbb988b7e1bbff0c0b28ad734b4157 /Lib/test/test_tempfile.py
parent1b63a57990e2471354f6efa4eea786c28aa773b5 (diff)
downloadcpython-8da2c5bd974b07cf15995e483aac3093971468b1.tar.gz
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.
Diffstat (limited to 'Lib/test/test_tempfile.py')
-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 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';