Lines Matching refs:async
30 async def test_enter(self):
32 async def __aexit__(self, *args):
38 async with manager as context:
42 async def test_async_gen_propagates_generator_exit(self):
46 async def ctx():
49 async def gen():
50 async with ctx():
56 async with ctx():
57 async for val in gen():
72 async def __aenter__(self):
74 async def __aexit__(self, exc_type, exc_value, traceback):
80 async def __aexit__(self, *args):
99 async def test_contextmanager_plain(self):
102 async def woohoo():
106 async with woohoo() as x:
113 async def test_contextmanager_finally(self):
116 async def woohoo():
123 async with woohoo() as x:
131 async def test_contextmanager_no_reraise(self):
133 async def whee():
141 async def test_contextmanager_trap_yield_after_throw(self):
143 async def whoo():
154 async def test_contextmanager_trap_no_yield(self):
156 async def whoo():
164 async def test_contextmanager_trap_second_yield(self):
166 async def whoo():
175 async def test_contextmanager_non_normalised(self):
177 async def whoo():
189 async def test_contextmanager_except(self):
192 async def woohoo():
199 async with woohoo() as x:
207 async def test_contextmanager_except_stopiter(self):
209 async def woohoo():
226 async with woohoo():
234 async def test_contextmanager_wrap_runtimeerror(self):
236 async def woohoo():
243 async with woohoo():
250 async with woohoo():
262 async def baz(spam):
279 async def test_instance_docstring_given_cm_docstring(self):
282 async with baz:
286 async def test_keywords(self):
289 async def woohoo(self, func, args, kwds):
291 async with woohoo(self=11, func=22, args=33, kwds=44) as target:
295 async def test_recursive(self):
300 async def woohoo():
312 async def recursive():
331 async def test_aclosing(self):
334 async def aclose(self):
338 async with aclosing(x) as y:
343 async def test_aclosing_error(self):
346 async def aclose(self):
351 async with aclosing(x) as y:
357 async def test_aclosing_bpo41229(self):
367 async def agenfunc():
375 async with aclosing(x) as y:
423 async def test_async_callback(self):
433 async def _exit(*args, **kwds):
437 async with AsyncExitStack() as stack:
456 async with AsyncExitStack() as stack:
466 async def test_async_push(self):
468 async def _expect_exc(exc_type, exc, exc_tb):
470 async def _suppress_exc(*exc_details):
472 async def _expect_ok(exc_type, exc, exc_tb):
479 async def __aenter__(self):
481 async def __aexit__(self, *exc_details):
484 async with self.exit_stack() as stack:
502 async def test_async_enter_context(self):
504 async def __aenter__(self):
506 async def __aexit__(self, *exc_details):
512 async with AsyncExitStack() as stack:
514 async def _exit():
524 async def test_async_exit_exception_chaining(self):
526 async def raise_exc(exc):
530 async def suppress_exc(*exc_details):
536 async with self.exit_stack() as stack:
556 async def test_async_exit_exception_explicit_none_context(self):
564 async def my_cm():
575 async def my_cm_with_exit_stack():
576 async with self.exit_stack() as stack:
583 async with cm():
593 async def test_async_nullcontext(self):
597 async with nullcontext(c) as c_in: