» ./python.exe -m test test_contextlib_async
Using random seed 908291980
0:00:00 load avg: 4.08 Run 1 test sequentially
0:00:00 load avg: 4.08 [1/1] test_contextlib_async
/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'AsyncContextManagerTestCase.test_contextmanager_trap_second_yield.<locals>.whoo' was never awaited
async def __aenter__(self):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'AsyncContextManagerTestCase.test_contextmanager_trap_yield_after_throw.<locals>.whoo' was never awaited
async def __aenter__(self):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'TestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit.<locals>.gen' was never awaited
async def __aenter__(self):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
== Tests result: SUCCESS ==
1 test OK.
Total duration: 121 ms
Total tests: run=58
Total test files: run=1/1
Result: SUCCESS
Bug report
This can be fixed by moving away from legacy
@_async_testand by using stabelIsolatedAsyncioTestCase.cpython/Lib/test/test_contextlib_async.py
Lines 14 to 20 in 6592976
Linked PRs
IsolatedAsyncTestCaseintest_contextlib_async.py#110379