summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | (merge 3.2) Issue #12383: fix test_empty_env() of subprocess on Mac OS XVictor Stinner2011-06-221-2/+6
|\ \ | |/ | | | | | | | | Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix also the test on the Py_ENABLE_SHARED config varible: test that the variable is present, don't check it's value.
| * Issue #12383: fix test_empty_env() of subprocess on Mac OS XVictor Stinner2011-06-221-2/+6
| | | | | | | | | | | | Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix also the test on the Py_ENABLE_SHARED config varible: test that the variable is present, don't check it's value.
* | (merge 3.2) Issue #12383: skip test_empty_env() if compiled is compiled inVictor Stinner2011-06-211-2/+5
|\ \ | |/ | | | | | | | | | | shared mode Try also to get more informations about the Mac OS X failure: display the keys of the environment, instead of just the number of variables.
| * Issue #12383: skip test_empty_env() if compiled is compiled in shared modeVictor Stinner2011-06-211-2/+5
| | | | | | | | | | Try also to get more informations about the Mac OS X failure: display the keys of the environment, instead of just the number of variables.
* | (merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy theVictor Stinner2011-06-211-7/+16
|\ \ | |/ | | | | environment variables, start with an empty environment.
| * Close #12383: Fix subprocess module with env={}: don't copy the environmentVictor Stinner2011-06-211-7/+16
| | | | | | | | variables, start with an empty environment.
* | Use a sleep for test_subprocess timeout testVictor Stinner2011-06-061-2/+3
| | | | | | | | instead of an active loop (while True: pass) to limit race conditions.
* | (Merge 3.2) Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes,Victor Stinner2011-06-011-0/+5
|\ \ | |/ | | | | | | | | | | | | | | the file descriptor of a pipe closed in the parent process is valid in the child process according to fstat(), but the mode of the file descriptor is invalid, and read or write raise an error. test.support.requires_mac_ver() is now a decorator, as suggested by Ezio Melotti, and its docstring is fixed (linux_version => mac_ver).
| * Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes, the fileVictor Stinner2011-06-011-0/+5
| | | | | | | | | | | | | | | | descriptor of a pipe closed in the parent process is valid in the child process according to fstat(), but the mode of the file descriptor is invalid, and read or write raise an error. Add also requires_mac_ver() decorator to test.support.
* | (Merge 3.2) Close #12085: Fix an attribute error in subprocess.Popen destructorVictor Stinner2011-05-311-0/+10
|\ \ | |/ | | | | | | if the constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan.
| * Close #12085: Fix an attribute error in subprocess.Popen destructor if theVictor Stinner2011-05-311-0/+10
| | | | | | | | | | constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan.
| * Fix ProcessTestCasePOSIXPurePython to test the module from import whenGregory P. Smith2011-05-281-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | _posixsubprocess doesn't exist rather than simply stubbing it out after the fact. This adds coverage for the RuntimeWarning as well as using the pure python _create_pipe instead of using _posixsubprocess.cloexec_pipe unintentionally with the pure python code. Ironically: I don't think any platform should ever actually _use_ the pure Python subprocess code on POSIX platforms anymore. This at least tests it properly in this stable branch. The pure python code for this is likely to be removed in 3.3.
| * merge - 7a3f3ad83676 Fixes Issue #12044.Gregory P. Smith2011-05-121-1/+2
| |
* | Issue #12196: Add PIPE_MAX_SIZE to test.support, constant larger than theCharles-François Natali2011-05-291-7/+4
| | | | | | | | underlying OS pipe buffer size.
* | follow on to the last commit, remove the final POSIXPurePythonTestCaseGregory P. Smith2011-05-281-1/+0
| | | | | | | | | | reference. (the difference between running test_subprocess.py directly rather than via regrtest.py)
* | The _posixsubprocess module is now required on POSIX.Gregory P. Smith2011-05-281-22/+0
| | | | | | | | | | | | | | | | | | Remove the pure Python POSIX subprocess implementation. If non-CPython VMs (are there any for 3.x yet?) were somehow depending on this, they already have the exact same set of problems with Python code being executed after os.fork() that _posixsubprocess was written to deal with. They should implement an equivalent outside of Python.
* | Fix ProcessTestCasePOSIXPurePython to test the module from import whenGregory P. Smith2011-05-281-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | _posixsubprocess doesn't exist rather than simply stubbing it out after the fact. This adds coverage for the RuntimeWarning as well as using the pure python _create_pipe instead of using _posixsubprocess.cloexec_pipe unintentionally with the pure python code. Ironically: I don't think any platform should ever actually _use_ the pure Python subprocess code on POSIX platforms anymore. This at least tests it properly in this stable branch. The pure python code for this is likely to be removed in 3.3.
* | - Issue #12044: Fixed subprocess.Popen when used as a context manager toGregory P. Smith2011-05-121-1/+2
| | | | | | | | | | wait for the process to end when exiting the context to avoid unintentionally leaving zombie processes around.
* | Merge with 3.2Ross Lagerwall2011-04-051-0/+19
|\ \ | |/
| * Merge with 3.1Ross Lagerwall2011-04-051-0/+19
| |\
| | * Issue #10963: Ensure that subprocess.communicate() never raises EPIPE.Ross Lagerwall2011-04-051-0/+19
| | |
* | | Merge with 3.2Ross Lagerwall2011-03-261-0/+1
|\ \ \ | |/ /
| * | Merge with 3.1Ross Lagerwall2011-03-261-0/+1
| |\ \ | | |/
| | * Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.Ross Lagerwall2011-03-261-0/+1
| | | | | | | | | | | | Patch by Ben Hayden.
* | | Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really createsAntoine Pitrou2011-03-191-0/+16
|\ \ \ | |/ / | | | | | | unbuffered pipes, such that select() works properly on them.
| * | Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really createsAntoine Pitrou2011-03-191-0/+16
| |\ \ | | |/ | | | | | | unbuffered pipes, such that select() works properly on them.
| | * Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really createsAntoine Pitrou2011-03-191-0/+15
| | | | | | | | | | | | unbuffered pipes, such that select() works properly on them.
| | * Fix whitespace in test_subprocessAntoine Pitrou2011-03-151-1/+1
| | |
| * | revert the test_main() change from 08daf3ef6509 so that regrtest continues ↵Gregory P. Smith2011-03-151-1/+14
| | | | | | | | | | | | to run this properly.
| * | Add unittests demonstrating issue #11432.Gregory P. Smith2011-03-151-15/+21
| | |
* | | Bump up the subprocess timeouts even more. :(Reid Kleckner2011-03-161-4/+6
| | |
* | | Include the timeout value in TimeoutExpired.Reid Kleckner2011-03-161-1/+3
| | | | | | | | | | | | | | | This was the original intention, but it wasn't threaded all the way through due to 'endtime'. Also added a trivial assertion to get coverage of __str__.
* | | Issue #5870: Add subprocess.DEVNULL constant.Ross Lagerwall2011-03-161-0/+25
| | |
* | | revert the test_main() change from 08daf3ef6509 so that regrtest continues ↵Gregory P. Smith2011-03-151-1/+14
| | | | | | | | | | | | to run this properly.
* | | Add unittests demonstrating issue #11432.Gregory P. Smith2011-03-151-15/+21
| | |
* | | merge 1579808ef25bGregory P. Smith2011-03-151-2/+5
|\ \ \ | |/ /
| * | merge 141bbcb19c06Gregory P. Smith2011-03-151-2/+5
| |\ \ | | |/
| | * Fix the @test_NNNN_tmp file terds being left in whatever your $PWD wasGregory P. Smith2011-03-151-2/+5
| | | | | | | | | | | | when test_subprocess was run.
* | | Tweak subprocess test timeouts to satisfy the buildbot.Reid Kleckner2011-03-141-2/+2
| | |
* | | Attempt a larger timeout value to satisfy the buildbots.Reid Kleckner2011-03-141-1/+1
| | |
* | | Add a 'timeout' argument to subprocess.Popen.Reid Kleckner2011-03-141-0/+65
| | | | | | | | | | | | | | | | | | | | | If the timeout expires before the subprocess exits, the wait method and the communicate method will raise a subprocess.TimeoutExpired exception. When used with communicate, it is possible to catch the exception, kill the process, and retry the communicate and receive any output written to stdout or stderr.
* | | Merge whitespace fix from 3.2.R David Murray2011-03-141-1/+1
|\ \ \ | |/ /
| * | Fix whitespaceR David Murray2011-03-141-1/+1
| | |
* | | Merge fix for #11490 from 3.2.R David Murray2011-03-141-1/+2
|\ \ \ | |/ /
| * | Merge fix for #11490 from 3.1.R David Murray2011-03-141-1/+2
| |\ \ | | |/
| | * #11490: EACCES can also mean command not foundR David Murray2011-03-141-1/+2
| | |
| | * Merged revisions 87695 via svnmerge fromAntoine Pitrou2011-01-031-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines Issue #10806, issue #9905: Fix subprocess pipes when some of the standard file descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross Lagerwall. ........
| | * fix "BytesWarning: str() on a bytes instance"Gregory P. Smith2010-12-141-1/+2
| | |
| | * Merged revisions 87233 via svnmerge fromGregory P. Smith2010-12-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87233 | gregory.p.smith | 2010-12-14 06:38:00 -0800 (Tue, 14 Dec 2010) | 4 lines Issue #1731717: Fixed the problem where subprocess.wait() could cause an OSError exception when The OS had been told to ignore SIGCLD in our process or otherwise not wait for exiting child processes. ........
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........