summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Update AbstractEventLoop: add new event loop methods; update also the unit testVictor Stinner2014-07-071-0/+12
|
* Python issue 21447, 21886: Fix a race condition when setting the result of aVictor Stinner2014-07-051-0/+6
| | | | | Future with call_soon(). Add an helper, an private method, to set the result only if the future was not cancelled.
* Better repr(CoroWrapper); add unit test for repr(CoroWrapper): ensure that ↵Victor Stinner2014-07-031-0/+4
| | | | the qualified name is used
* repr(Task): include also the future the task is waiting forVictor Stinner2014-07-011-0/+11
|
* Fix test_sleep_cancel(): call_later() mock has no self parameterVictor Stinner2014-07-011-2/+2
|
* Fix "Task was destroyed but it is pending!" warning in ↵Victor Stinner2014-06-301-0/+1
| | | | test_task_source_traceback()
* Move coroutine code in the new module asyncio.coroutinesVictor Stinner2014-06-291-17/+17
|
* Fix two "Coroutine xxx was never yielded from" messages in testsVictor Stinner2014-06-281-2/+6
|
* Fix unit tests on Windows, escape filenames in regexVictor Stinner2014-06-282-6/+6
|
* Tulip issue #137: In debug mode, save traceback where Future, Task and HandleVictor Stinner2014-06-274-6/+113
| | | | | | | | | | | objects are created. Pass the traceback to call_exception_handler() in the 'source_traceback' key. The traceback is truncated to hide internal calls in asyncio, show only the traceback from user code. Add tests for the new source_traceback, and a test for the 'Future/Task exception was never retrieved' log.
* Tulip issue #137: In debug mode, add the traceback where the coroutine objectVictor Stinner2014-06-271-0/+32
| | | | was created to the "coroutine ... was never yield from" log
* Oops, restore a removed testVictor Stinner2014-06-271-0/+3
|
* Python issue 21163: Fix one more "Task was destroyed but it is pending!" log ↵Victor Stinner2014-06-251-2/+6
| | | | in tests
* Python issue 21163: Fix more "Task was destroyed but it is pending!" logs in ↵Victor Stinner2014-06-251-0/+3
| | | | tests
* Add test to check that run_until_complete() checks the loop of the futureVictor Stinner2014-06-251-0/+6
|
* Python issue 21163: Fix some "Task was destroyed but it is pending!" logs in ↵Victor Stinner2014-06-253-16/+22
| | | | tests
* Tulip issue #177: Rewite repr() of Future, Task, Handle and TimerHandleVictor Stinner2014-06-254-75/+129
| | | | | | - Uniformize repr() output to format "<Class ...>" - On Python 3.5+, repr(Task) uses the qualified name instead of the short name of the coroutine
* repr(Task) now also contains the line number even if the coroutine is done: useVictor Stinner2014-06-241-2/+4
| | | | | | | | the first line number of the code object instead of the current line number of the generator frame. The name of the coroutine is not enough because many coroutines may have the same name. It's a common case in asyncio tests for example.
* Log an error if a Task is destroyed while it is still pending, but only onVictor Stinner2014-06-241-3/+42
| | | | Python 3.4 and newer.
* Make slow_select() test pass on Windows.Guido van Rossum2014-06-231-1/+2
|
* Tulip issue #171: BaseEventLoop.close() now raises an exception if the eventVictor Stinner2014-06-231-0/+9
| | | | | loop is running. You must first stop the event loop and then wait until it stopped, before closing it.
* Tulip issue #172: only log selector timing in debug modeVictor Stinner2014-06-231-0/+3
|
* Add an unit test to check that setting the PYTHONASYNCIODEBUG env var enablesVictor Stinner2014-06-232-4/+24
| | | | debug mode of the event loop.
* Enable the debug mode of event loops when the PYTHONASYNCIODEBUG environmentVictor Stinner2014-06-234-12/+4
| | | | variable is set
* Tulip issue #105: in debug mode, log callbacks taking more than 100 ms to beVictor Stinner2014-06-201-0/+28
| | | | executed.
* Fix pyflakes errorsVictor Stinner2014-06-183-5/+2
| | | | | | - Add a missing import - Remove an unused import - Remove unused variables
* Refactor tests: add a base TestCase classVictor Stinner2014-06-1812-219/+127
|
* Refactor test__run_once_logging() to not rely on the exact number of calls toVictor Stinner2014-06-181-18/+11
| | | | time.monotonic(). Use a "fast select" and a "slow select" instead.
* Set __qualname__ attribute of CoroWrapper in @coroutine decoratorVictor Stinner2014-06-181-8/+40
| | | | | | | | | - Drop __slots__ optimization of CoroWrapper to be able to set the __qualname__ attribute. - Add tests on __name__, __qualname__ and __module__ of a coroutine function and coroutine object. - Fix test_tasks when run in debug mode (PYTHONASYNCIODEBUG env var set) on Python 3.3 or 3.4
* Python issue 21723: asyncio.Queue: support any type of number (ex: float) forVictor Stinner2014-06-181-0/+15
| | | | the maximum size. Patch written by Vajrasky Kok.
* Fix test_tasks for Python 3.5Victor Stinner2014-06-161-4/+8
| | | | | | On Python 3.5, generator now gets their name from the function, no more from the code. So we get the expected "notmuch" name instead of the generic "coro" name.
* Issue #173: Enhance repr(Handle) and repr(Task)Victor Stinner2014-06-122-29/+78
| | | | | | | | | | repr(Handle) is shorter for function: "foo" instead of "<function foo at 0x...>". It now also includes the source of the callback, filename and line number where it was defined, if available. repr(Task) now also includes the current position in the code, filename and line number, if available. If the coroutine (generator) is done, the line number is omitted and "done" is added.
* Tulip issue #169, Python issue #21326: Add BaseEventLoop.is_closed() methodVictor Stinner2014-06-042-3/+28
| | | | | | | | | | | Add BaseEventLoop._closed attribute and use it to check if the event loop was closed or not, instead of checking different attributes in each subclass of BaseEventLoop. run_forever() and run_until_complete() now raises a RuntimeError('Event loop is closed') exception if the event loop was closed. BaseProactorEventLoop.close() now also cancels "accept futures".
* Fix tests on Windows: wait for the subprocess exitVictor Stinner2014-06-041-0/+2
| | | | | Before, regrtest failed to remove the temporary test directory because the process was still running in this directory.
* Python issue #21651: Fix ResourceWarning when running asyncio tests on Windows.Victor Stinner2014-06-041-0/+1
| | | | Patch written by Claudiu Popa.
* cleanup test_base_events: cm variable was unusedVictor Stinner2014-06-041-1/+1
|
* Make sure that socketpair() close sockets on errorVictor Stinner2014-06-041-0/+9
| | | | Close the listening socket if sock.bind() raises an exception.
* Close sockets on errorsVictor Stinner2014-06-042-0/+39
| | | | | | | Fix ResourceWarning: BaseEventLoop.create_connection(), BaseEventLoop.create_datagram_endpoint() and _UnixSelectorEventLoop.create_unix_server() now close the newly created socket on error.
* Fix for raising exception not derived from BaseException in ↵Andrew Svetlov2014-05-271-0/+4
| | | | _SelectorSslTransport.resume_reading
* test_base_events: use mock.Mock instead of unittest.mock.Mock to simplify theVictor Stinner2014-05-201-1/+1
| | | | synchronization with Trollius
* Fix test failures by not cleaning up watcher in test for issue #168.Guido van Rossum2014-05-131-6/+9
|
* Fix issue 168: StreamReader.read(-1) from pipe may hang if data exceeds ↵Guido van Rossum2014-05-121-0/+36
| | | | buffer limit.
* Fix the second half of bugs.python.org/issue21447: race in _write_to_self().Guido van Rossum2014-05-061-2/+3
|
* Add __weakref__ slots to Handle and CoroWrapper. Fixes issue #166.Guido van Rossum2014-04-272-0/+14
|
* Remove superfluous and useless line.Guido van Rossum2014-04-181-1/+0
| | | | (According to Benjamin in CPython repo rev 30a7e37b8441.)
* Add gi_{frame,running,code} properties to CoroWrapper. Fixes issue #163.Guido van Rossum2014-04-151-0/+47
|
* tasks: Make sure CoroWrapper.send proxies one argument correctlyYury Selivanov2014-04-151-0/+18
|
* tasks: Fix CoroWrapper to workaround yield-from bug in CPythonYury Selivanov2014-04-141-0/+25
|
* EventLoop.create_unix_server() now raises a ValueError if path and sock areVictor Stinner2014-04-051-0/+11
| | | | specified at the same time
* Ensure call_soon(), call_later() and call_at() are invoked on current loop inVictor Stinner2014-03-211-0/+23
| | | | | | debug mode. Raise a RuntimeError if the event loop of the current thread is different. The check should help to debug thread-safetly issue. Patch written by David Foster.