diff options
author | Gregory P. Smith <greg@krypto.org> | 2011-03-15 06:13:09 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2011-03-15 06:13:09 (GMT) |
commit | de3909da6b8d09b7bcb142994ebd6daba61a23d3 (patch) | |
tree | 3e01978c50e63884efd8e11d222cf108830ab47a /Lib | |
parent | 4969f709cc07088a40574c05724d83cddc8fafc7 (diff) | |
parent | 81ce68597c0232d7c716c20c662dd0a70fdf31db (diff) | |
download | cpython-de3909da6b8d09b7bcb142994ebd6daba61a23d3.zip cpython-de3909da6b8d09b7bcb142994ebd6daba61a23d3.tar.gz cpython-de3909da6b8d09b7bcb142994ebd6daba61a23d3.tar.bz2 |
merge 141bbcb19c06
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_subprocess.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 5100a20..73f44ad 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -11,6 +11,7 @@ import re import sysconfig import warnings import select +import shutil try: import gc except ImportError: @@ -488,11 +489,12 @@ class ProcessTestCase(BaseTestCase): 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 @@ class ProcessTestCase(BaseTestCase): finally: for h in handles: os.close(h) + shutil.rmtree(tmpdir) def test_list2cmdline(self): self.assertEqual(subprocess.list2cmdline(['a b c', 'd', 'e']), |