summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tempfile.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-08 16:30:34 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-08 16:30:34 (GMT)
commitce92147cc8d1bbef1726857cb32f6d652aa09871 (patch)
treedd9a7188c4f82e03d60c52967e931b0198a63064 /Lib/test/test_tempfile.py
parent05d284b7aad784b61a658ee8b9a53b058380518c (diff)
downloadcpython-ce92147cc8d1bbef1726857cb32f6d652aa09871.zip
cpython-ce92147cc8d1bbef1726857cb32f6d652aa09871.tar.gz
cpython-ce92147cc8d1bbef1726857cb32f6d652aa09871.tar.bz2
Added the Mac to platforms that don't have user/group/other modes.
Set the limit for the number of open files to 32 if platform==mac.
Diffstat (limited to 'Lib/test/test_tempfile.py')
-rw-r--r--Lib/test/test_tempfile.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 901a07c..09b9a10 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -25,7 +25,10 @@ has_spawnl = hasattr(os, 'spawnl')
# TEST_FILES may need to be tweaked for systems depending on the maximum
# number of files that can be opened at one time (see ulimit -n)
-TEST_FILES = 100
+if sys.platform == 'mac':
+ TEST_FILES = 32
+else:
+ TEST_FILES = 100
# This is organized as one test for each chunk of code in tempfile.py,
# in order of their appearance in the file. Testing which requires
@@ -258,7 +261,7 @@ class test__mkstemp_inner(TC):
file = self.do_create()
mode = stat.S_IMODE(os.stat(file.name).st_mode)
expected = 0600
- if sys.platform in ('win32', 'os2emx'):
+ if sys.platform in ('win32', 'os2emx', 'mac'):
# There's no distinction among 'user', 'group' and 'world';
# replicate the 'user' bits.
user = expected >> 6
@@ -463,7 +466,7 @@ class test_mkdtemp(TC):
try:
mode = stat.S_IMODE(os.stat(dir).st_mode)
expected = 0700
- if sys.platform in ('win32', 'os2emx'):
+ if sys.platform in ('win32', 'os2emx', 'mac'):
# There's no distinction among 'user', 'group' and 'world';
# replicate the 'user' bits.
user = expected >> 6