[Python-checkins] cpython (merge 3.1 -> 3.2): merge 141bbcb19c06
gregory.p.smith
python-checkins at python.org
Tue Mar 15 07:18:34 CET 2011
http://hg.python.org/cpython/rev/1579808ef25b
changeset: 68492:1579808ef25b
branch: 3.2
parent: 68489:81d7f78a633a
parent: 68491:141bbcb19c06
user: Gregory P. Smith <greg at krypto.org>
date: Tue Mar 15 02:13:09 2011 -0400
summary:
merge 141bbcb19c06
files:
Lib/test/test_subprocess.py
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -11,6 +11,7 @@
import sysconfig
import warnings
import select
+import shutil
try:
import gc
except ImportError:
@@ -488,11 +489,12 @@
else:
max_handles = 2050 # too much for (at least some) Windows setups
handles = []
+ tmpdir = tempfile.mkdtemp()
try:
for i in range(max_handles):
try:
- handles.append(os.open(support.TESTFN,
- os.O_WRONLY | os.O_CREAT))
+ tmpfile = os.path.join(tmpdir, support.TESTFN)
+ handles.append(os.open(tmpfile, os.O_WRONLY|os.O_CREAT))
except OSError as e:
if e.errno != errno.EMFILE:
raise
@@ -517,6 +519,7 @@
finally:
for h in handles:
os.close(h)
+ shutil.rmtree(tmpdir)
def test_list2cmdline(self):
self.assertEqual(subprocess.list2cmdline(['a b c', 'd', 'e']),
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list