summaryrefslogtreecommitdiff
path: root/tests/test_tasks.py
Commit message (Collapse)AuthorAgeFilesLines
* Python issue #23219: cancelling wait_for() now cancels the taskVictor Stinner2015-01-151-0/+27
|
* Truncate to 80 columnsVictor Stinner2015-01-091-4/+8
|
* CPython doesn't have asyncio.test_supportVictor Stinner2014-12-261-12/+17
|
* asyncio.test_support now uses test.support and test.script_helper if availableVictor Stinner2014-12-191-17/+12
|
* Copy a subset of test.support from CPython 3.5 to no more depend on the testVictor Stinner2014-12-181-2/+6
| | | | module to run the asyncio test suite. The test module is rarely installed.
* test_tasks: Fix test_env_var_debug to use correct asyncio module (issue #207)Yury Selivanov2014-09-251-4/+11
|
* Tulip issue #201: Fix a race condition in wait_for()Victor Stinner2014-08-281-0/+15
| | | | | | Don't raise a TimeoutError if we reached the timeout and the future completed in the same iteration of the event loop. A side effect of the bug is that Queue.get() looses items.
* Enhance representation of Future and Future subclassesVictor Stinner2014-07-291-0/+6
| | | | | | | | | | * Add "created at filename:lineno" in the representation * Add Future._repr_info() method which can be more easily overriden than Future.__repr__(). It should now be more easy to enhance Future representation without having to modify each subclass. For example, _OverlappedFuture and _WaitHandleFuture get the new "created at" information. * Use reprlib to format Future result, and function arguments when formatting a callback, to limit the length of the representation.
* test_as_completed(): disable "slow callback" warningVictor Stinner2014-07-161-0/+2
|
* Python issue 21163: Fix "destroy pending task" warning in test_wait_errors()Victor Stinner2014-07-161-4/+7
|
* Fix some pyflakes warnings: remove unused importsVictor Stinner2014-07-111-5/+4
|
* Improve CoroWrapper: copy also the qualified name on Python 3.4, not only onVictor Stinner2014-07-111-7/+2
| | | | Python 3.5+
* CoroWrapper.__del__() now reuses repr(CoroWrapper) to log the "... was neverVictor Stinner2014-07-111-1/+1
| | | | yielded from" warning
* repr(Task) and repr(CoroWrapper) now also includes where these objects wereVictor Stinner2014-07-101-7/+42
| | | | | | | created. If the coroutine is not a generator (don't use "yield from"), use the location of the function, not the location of the coro() wrapper.
* tests: fix a warningVictor Stinner2014-07-081-0/+3
|
* 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-281-2/+2
|
* Tulip issue #137: In debug mode, save traceback where Future, Task and HandleVictor Stinner2014-06-271-0/+14
| | | | | | | | | | | 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
* Python issue 21163: Fix some "Task was destroyed but it is pending!" logs in ↵Victor Stinner2014-06-251-6/+4
| | | | tests
* Tulip issue #177: Rewite repr() of Future, Task, Handle and TimerHandleVictor Stinner2014-06-251-31/+47
| | | | | | - 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.
* Add an unit test to check that setting the PYTHONASYNCIODEBUG env var enablesVictor Stinner2014-06-231-4/+0
| | | | debug mode of the event loop.
* Enable the debug mode of event loops when the PYTHONASYNCIODEBUG environmentVictor Stinner2014-06-231-0/+2
| | | | variable is set
* Fix pyflakes errorsVictor Stinner2014-06-181-1/+0
| | | | | | - Add a missing import - Remove an unused import - Remove unused variables
* Refactor tests: add a base TestCase classVictor Stinner2014-06-181-69/+36
|
* 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
* 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-121-8/+21
| | | | | | | | | | 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.
* Add __weakref__ slots to Handle and CoroWrapper. Fixes issue #166.Guido van Rossum2014-04-271-0/+8
|
* 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
|
* Fix pyflakes warnings: remove unused variables and importsVictor Stinner2014-02-261-6/+2
|
* Issue #136: Add get/set_debug() methods to BaseEventLoopTests. Add also aVictor Stinner2014-02-191-0/+28
| | | | | PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module.
* pep8-ify the code.Yury Selivanov2014-02-181-1/+3
|
* Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue ↵Guido van Rossum2014-02-121-1/+22
| | | | #127.
* 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 #126: call_soon(), call_soon_threadsafe(), call_later(), call_at() andVictor Stinner2014-02-111-7/+5
| | | | | run_in_executor() now raise a TypeError if the callback is a coroutine function.
* Fix test bug (should use list, not set).Guido van Rossum2014-02-081-1/+1
|
* tasks: Fix as_completed, gather & wait to work with duplicate coroutines. ↵Yury Selivanov2014-02-061-8/+47
| | | | Issue #114