summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Issue #157: Improve test_events.py, avoid run_briefly() which is not reliableVictor Stinner2014-03-061-64/+65
|
* Skip test_remove_fds_after_closing() for IocpEventLoopVictor Stinner2014-03-061-0/+3
|
* Fix ResourceWarning warningsVictor Stinner2014-03-061-0/+4
|
* Issue #159: Fix windows_utils.socketpair()Victor Stinner2014-03-051-4/+23
| | | | | | | * Use "127.0.0.1" (IPv4) or "::1" (IPv6) host instead of "localhost", because "localhost" may be a different IP address * Reject also invalid arguments: only AF_INET/AF_INET6 with SOCK_STREAM (and proto=0) are supported
* Reject add/remove reader/writer when event loop is closed.Guido van Rossum2014-03-041-0/+20
|
* Simplify test_events.py, don't use non local variables and don't call assertVictor Stinner2014-02-261-186/+79
| | | | | | | methods in coroutines. It also simplify merges from Tulip to Trollius (Python 2 does not support non local variables).
* Fix pyflakes warnings: remove unused variables and importsVictor Stinner2014-02-267-16/+6
|
* Cleanup test_unix_events.py (indentation)Victor Stinner2014-02-261-9/+6
|
* Replace "unittest.mock" with "mock" in unit testsVictor Stinner2014-02-2612-384/+384
| | | | | Use "from unittest import mock". It should simplify my work to merge new tests in Trollius, because Trollius uses "mock" backport for Python 2.
* _check_resolved_address() must also accept IPv6 without flow_info and scope_id:Victor Stinner2014-02-201-3/+6
| | | | (host, port).
* Oops, and now fix also the unit test for IPv6 address: ↵Victor Stinner2014-02-201-4/+3
| | | | test_sock_connect_address()
* Issue #136: Add get/set_debug() methods to BaseEventLoopTests. Add also aVictor Stinner2014-02-192-0/+34
| | | | | PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module.
* Fix tests on UNIX sockets on Mac OS X 10.4 (Tiger): don't test the socknameVictor Stinner2014-02-191-5/+27
| | | | extra info, getsockname() has a bug on this old OS X kernel.
* WriteTransport.set_write_buffer_size to call _maybe_pause_protocol (closes ↵Yury Selivanov2014-02-191-0/+23
| | | | issue #140)
* pep8-ify the code.Yury Selivanov2014-02-183-5/+17
|
* Fix spelling & typosYury Selivanov2014-02-184-6/+6
|
* Issue #143: UNIX domain methods, fix ResourceWarning and DeprecationWarningVictor Stinner2014-02-191-13/+15
| | | | | warnings. create_unix_server() closes the socket on any error, not only on OSError.
* Issue #139: Improve error messages on "fatal errors"Victor Stinner2014-02-193-16/+40
| | | | | Mention if the error was caused by a read or a write, and be more specific on the object (ex: "pipe transport" instead of "transport").
* Add new event loop exception handling API (closes issue #80).Yury Selivanov2014-02-186-59/+258
| | | | | | | | New APIs: - loop.set_exception_handler() - loop.default_exception_handler() - loop.call_exception_handler()
* Add support for UNIX Domain Sockets. Closes issue #81.Yury Selivanov2014-02-185-156/+475
| | | | | | | | | New APIs: - loop.create_unix_connection - loop.create_unix_server - streams.open_unix_connection - streams.start_unix_server
* Skip test_read_pty_output() on OpenBSDVictor Stinner2014-02-181-0/+4
|
* Fix test_events.py: skip IPv6 if IPv6 is disabled on the hostVictor Stinner2014-02-131-1/+5
|
* Issue #129: BaseEventLoop.sock_connect() now raises an error if the address isVictor Stinner2014-02-131-0/+12
| | | | | not resolved (hostname instead of an IP address) for AF_INET and AF_INET6 address families.
* Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue ↵Guido van Rossum2014-02-121-1/+22
| | | | #127.
* Python issue #20495: Skip test_read_pty_output() of test_asyncio on FreeBSDVictor Stinner2014-02-111-0/+2
| | | | older than FreeBSD 8
* Issue #131: as_completed() and wait() now raises a TypeError if the list ofVictor Stinner2014-02-111-0/+26
| | | | futures is not a list but a Future, Task or coroutine object
* Issue #130: Add more checks on subprocess_exec/subprocess_shell parametersVictor Stinner2014-02-111-2/+52
|
* Issue #126: call_soon(), call_soon_threadsafe(), call_later(), call_at() andVictor Stinner2014-02-114-12/+29
| | | | | run_in_executor() now raise a TypeError if the callback is a coroutine function.
* Python issue #20505: BaseEventLoop uses again the resolution of the clock toVictor Stinner2014-02-101-4/+9
| | | | decide if scheduled tasks should be executed or not.
* Issue #112: Inline make_handle() into Handle constructorVictor Stinner2014-02-101-2/+2
|
* Remove Process.subprocess attribute; it's too easy to get inconsistent ProcessVictor Stinner2014-02-091-20/+0
| | | | and Popen objects
* Fix test bug (should use list, not set).Guido van Rossum2014-02-081-1/+1
|
* Remove scories of resolution/granularityVictor Stinner2014-02-093-7/+0
|
* Remove resolution and _granularity from selectors and asyncioVictor Stinner2014-02-072-17/+9
| | | | | * Remove selectors.BaseSelector.resolution attribute * Remove asyncio.BaseEventLoop._granularity attribute
* tasks: Fix as_completed, gather & wait to work with duplicate coroutines. ↵Yury Selivanov2014-02-061-8/+47
| | | | Issue #114
* streams.StreamReader: Add 'at_eof()' methodYury Selivanov2014-02-061-0/+15
|
* streams.StreamReader: Use bytearray instead of deque of bytes for internal ↵Yury Selivanov2014-02-041-27/+52
| | | | buffer
* Cosmetic improvement to test__run_once_logging() mock argument.Guido van Rossum2014-02-041-5/+3
|
* Adjust unit tests regarding timings: tolerate slow buildbots, add a test on theVictor Stinner2014-02-043-8/+17
| | | | granularity
* test_events: skip PTY tests on Mac OS X older than 10.6Victor Stinner2014-02-031-0/+6
|
* 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
* Copy a bunch of fixes by Victor for the Proactor event loop from the CPython ↵Guido van Rossum2014-01-312-2/+9
| | | | repo.
* Normalize whitespace (use "make pep8" to verify).Guido van Rossum2014-01-302-13/+14
|
* Future.set_exception(exc) now instanciate exc if it is a classVictor Stinner2014-01-301-0/+5
| | | | For example, Future.set_exception(RuntimeError) is now allowed.
* subprocess_shell() and subprocess_exec() methods of BaseEventLoop now raises aVictor Stinner2014-01-291-0/+32
| | | | | ValueError instead of raising an AssertionError. Moreover, bufsize different than 0 is now considered as an error.
* wait_for() now accepts None as timeoutVictor Stinner2014-01-281-0/+11
|
* Rename {Empty,Full} to {QueueEmpty,QueueFull} and no longer get them from ↵Guido van Rossum2014-01-251-2/+2
| | | | queue.py.
* Locks refactor: use a separate context manager; remove Semaphore._locked.Guido van Rossum2014-01-251-0/+35
|
* Make the new granularity attribute privateVictor Stinner2014-01-261-2/+2
|