summaryrefslogtreecommitdiff
path: root/tests/test_subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22685: Fix test_pause_reading() of test_subprocessVictor Stinner2015-01-151-2/+12
| | | | | | | Override the connect_read_pipe() method of the loop to mock immediatly pause_reading() and resume_reading() methods. The test failed randomly on FreeBSD 9 buildbot and on Windows using trollius.
* Close transports in testsVictor Stinner2015-01-151-0/+1
| | | | | | | | | * Use test_utils.run_briefly() to execute pending calls to really close transports * sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport * pipe test: the test doesn't close explicitly the PipeHandle, so ignore the warning instead * test_popen: use the context manager ("with p:") to explicitly close pipes
* Python issue #23173: Fix SubprocessStreamProtocol.connection_made() to handleVictor Stinner2015-01-141-0/+36
| | | | | | cancelled waiter. Add unit test cancelling subprocess methods.
* Truncate to 80 columnsVictor Stinner2015-01-091-1/+3
|
* Python issue #23140: Simplify the unit testVictor Stinner2015-01-061-8/+6
|
* Issue #23140: Fix cancellation of Process.wait(). Check the state of the waiterVictor Stinner2015-01-061-0/+28
| | | | future before setting its result.
* CPython doesn't have asyncio.test_supportVictor Stinner2014-12-261-1/+4
|
* Python issue #22926: In debug mode, call_soon(), call_at() and call_later()Victor Stinner2014-12-261-19/+3
| | | | | | | | | | methods of BaseEventLoop now use the identifier of the current thread to ensure that they are called from the thread running the event loop. Before, the get_event_loop() method was used to check the thread, and no exception was raised when the thread had no event loop. Now the methods always raise an exception in debug mode when called from the wrong thread. It should help to notice misusage of the API.
* asyncio.test_support now uses test.support and test.script_helper if availableVictor Stinner2014-12-191-4/+1
|
* Copy a subset of test.support from CPython 3.5 to no more depend on the testVictor Stinner2014-12-181-4/+8
| | | | module to run the asyncio test suite. The test module is rarely installed.
* Fix subprocess for close_fds=False on Python 3.3Victor Stinner2014-12-111-0/+21
| | | | Mark the write end of the stdin pipe as non-inheritable.
* Python issue #22685: Fix test_pause_reading() of test_subprocessVictor Stinner2014-12-041-7/+12
| | | | | * mock also resume_reading() * ensure that resume_reading() is called
* Python issue #22685: Set the transport of stdout and stderr StreamReaderVictor Stinner2014-11-251-0/+32
| | | | | objects in the SubprocessStreamProtocol. It allows to pause the transport to not buffer too much stdout or stderr data.
* Don't log expected errors in unit testsVictor Stinner2014-07-301-3/+5
|
* test_subprocess: relax timings for slow builbotsVictor Stinner2014-07-251-2/+2
|
* Fix test_stdin_broken_pipe(): drain() is not a coroutineVictor Stinner2014-07-211-2/+7
|
* Python issue 21247: Fix a race condition in test_send_signal() of asyncioVictor Stinner2014-07-171-4/+15
| | | | | Add a basic synchronization mechanism to wait until the child process is ready before sending it a signal.
* Fix test_stdin_broken_pipe(): drain() can also raise ConnectionResetErrorVictor Stinner2014-07-171-2/+2
|
* asyncio, tulip issue 190: Process.communicate() must ignore BrokenPipeErrorVictor Stinner2014-07-171-7/+20
| | | | | | | | If you want to handle the BrokenPipeError, you can easily reimplement communicate(). Add also a unit test to ensure that stdin.write() + stdin.drain() raises BrokenPipeError.
* Enable the debug mode of event loops when the PYTHONASYNCIODEBUG environmentVictor Stinner2014-06-231-2/+2
| | | | variable is set
* Refactor tests: add a base TestCase classVictor Stinner2014-06-181-4/+6
|
* pep8-ify the code.Yury Selivanov2014-02-181-2/+10
|
* Remove Process.subprocess attribute; it's too easy to get inconsistent ProcessVictor Stinner2014-02-091-20/+0
| | | | and Popen objects
* Replace Process.get_subprocess() method with a Process.subprocess read-only ↵Victor Stinner2014-02-031-9/+9
| | | | property
* Merge (manually) the subprocess_stream into defaultVictor Stinner2014-02-011-0/+196
* Add a new asyncio.subprocess module * Add new create_subprocess_exec() and create_subprocess_shell() functions * The new asyncio.subprocess.SubprocessStreamProtocol creates stream readers for stdout and stderr and a stream writer for stdin. * The new asyncio.subprocess.Process class offers an API close to the subprocess.Popen class: - pid, returncode, stdin, stdout and stderr attributes - communicate(), wait(), send_signal(), terminate() and kill() methods * Remove STDIN (0), STDOUT (1) and STDERR (2) constants from base_subprocess and unix_events, to not be confused with the symbols with the same name of subprocess and asyncio.subprocess modules * _ProactorBasePipeTransport.get_write_buffer_size() now counts also the size of the pending write * _ProactorBaseWritePipeTransport._loop_writing() may now pause the protocol if the write buffer size is greater than the high water mark (64 KB by default) * Add new subprocess examples: shell.py, subprocess_shell.py, * subprocess_attach_read_pipe.py and subprocess_attach_write_pipe.py