cpython/Lib/test/test_asyncio
Serhiy Storchaka 6c23635f2b
gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)
asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.

* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
  sequentially).
* If there is no current task when entering the context manager.

They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2023-10-21 22:18:34 +03:00
..
__init__.py
__main__.py
echo.py
echo2.py
echo3.py
functional.py
test_base_events.py gh-110771: Decompose run_forever() into parts (#110773) 2023-10-13 14:12:32 +00:00
test_buffered_proto.py
test_context.py
test_eager_task_factory.py gh-109653: Remove unused imports in the `Lib/` directory (#109803) 2023-09-24 15:07:23 +01:00
test_events.py gh-110088: Fix asyncio test_prompt_cancellation() (#110157) 2023-09-30 22:40:10 +02:00
test_futures.py
test_futures2.py
test_locks.py
test_pep492.py
test_proactor_events.py
test_protocols.py
test_queues.py
test_runners.py gh-94597: Add asyncio.EventLoop (#110723) 2023-10-12 07:13:57 -07:00
test_selector_events.py
test_sendfile.py
test_server.py
test_sock_lowlevel.py gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) 2023-09-07 01:58:03 +02:00
test_ssl.py
test_sslproto.py gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) 2023-09-07 01:58:03 +02:00
test_streams.py
test_subprocess.py Add support.MS_WINDOWS constant (#110446) 2023-10-06 02:37:28 +02:00
test_taskgroups.py gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111) 2023-10-21 22:18:34 +03:00
test_tasks.py
test_threads.py
test_timeouts.py gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111) 2023-10-21 22:18:34 +03:00
test_transports.py
test_unix_events.py gh-110335: asyncio test_unix_events cleans multiprocessing (#110336) 2023-10-04 09:19:08 +00:00
test_waitfor.py gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) 2023-09-29 11:49:30 +00:00
test_windows_events.py gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) 2023-09-29 11:49:30 +00:00
test_windows_utils.py
utils.py gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111) 2023-10-21 22:18:34 +03:00