Lines Matching full:async
15 """Decorator to turn an async function into a test case."""
29 async def test_enter(self):
31 async def __aexit__(self, *args):
37 async with manager as context:
41 async def test_async_gen_propagates_generator_exit(self):
45 async def ctx():
48 async def gen():
49 async with ctx():
55 async with ctx():
56 async for val in gen():
71 async def __aenter__(self):
73 async def __aexit__(self, exc_type, exc_value, traceback):
79 async def __aexit__(self, *args):
98 async def test_contextmanager_plain(self):
101 async def woohoo():
105 async with woohoo() as x:
112 async def test_contextmanager_finally(self):
115 async def woohoo():
122 async with woohoo() as x:
130 async def test_contextmanager_traceback(self):
132 async def f():
136 async with f():
150 async with f():
173 async with f():
186 async def test_contextmanager_no_reraise(self):
188 async def whee():
196 async def test_contextmanager_trap_yield_after_throw(self):
198 async def whoo():
209 async def test_contextmanager_trap_no_yield(self):
211 async def whoo():
219 async def test_contextmanager_trap_second_yield(self):
221 async def whoo():
230 async def test_contextmanager_non_normalised(self):
232 async def whoo():
244 async def test_contextmanager_except(self):
247 async def woohoo():
254 async with woohoo() as x:
262 async def test_contextmanager_except_stopiter(self):
264 async def woohoo():
281 async with woohoo():
289 async def test_contextmanager_wrap_runtimeerror(self):
291 async def woohoo():
298 async with woohoo():
305 async with woohoo():
317 async def baz(spam):
334 async def test_instance_docstring_given_cm_docstring(self):
337 async with baz:
341 async def test_keywords(self):
344 async def woohoo(self, func, args, kwds):
346 async with woohoo(self=11, func=22, args=33, kwds=44) as target:
350 async def test_recursive(self):
355 async def woohoo():
367 async def recursive():
377 async def test_decorator(self):
381 async def context():
388 async def test():
396 async def test_decorator_with_exception(self):
400 async def context():
409 async def test():
419 async def test_decorating_method(self):
422 async def context():
429 async def method(self, a, b, c=None):
462 async def test_aclosing(self):
465 async def aclose(self):
469 async with aclosing(x) as y:
474 async def test_aclosing_error(self):
477 async def aclose(self):
482 async with aclosing(x) as y:
488 async def test_aclosing_bpo41229(self):
498 async def agenfunc():
506 async with aclosing(x) as y:
559 async def test_async_callback(self):
569 async def _exit(*args, **kwds):
573 async with AsyncExitStack() as stack:
592 async with AsyncExitStack() as stack:
602 async def test_async_push(self):
604 async def _expect_exc(exc_type, exc, exc_tb):
606 async def _suppress_exc(*exc_details):
608 async def _expect_ok(exc_type, exc, exc_tb):
615 async def __aenter__(self):
617 async def __aexit__(self, *exc_details):
620 async with self.exit_stack() as stack:
638 async def test_enter_async_context(self):
640 async def __aenter__(self):
642 async def __aexit__(self, *exc_details):
648 async with AsyncExitStack() as stack:
650 async def _exit():
660 async def test_enter_async_context_errors(self):
664 async def __aexit__(self, *exc_info):
667 async def __aenter__(self):
670 async with self.exit_stack() as stack:
680 async def test_async_exit_exception_chaining(self):
682 async def raise_exc(exc):
686 async def suppress_exc(*exc_details):
692 async with self.exit_stack() as stack:
712 async def test_async_exit_exception_explicit_none_context(self):
720 async def my_cm():
731 async def my_cm_with_exit_stack():
732 async with self.exit_stack() as stack:
739 async with cm():
747 async def test_instance_bypass_async(self):
761 async def test_async_nullcontext(self):
765 async with nullcontext(c) as c_in: