← back to Atmos Game
assets/gen/.venv/lib/python3.12/site-packages/anyio/abc/__pycache__/_testing.cpython-312.pyc
41 lines
�
c�bj� � �x � d dl mZ d dlZd dlmZmZ d dlmZmZm Z m
Z
d dlmZm
Z
e
d� Z G d� de� � Zy)
� )�annotationsN)�ABCMeta�abstractmethod)�AsyncGenerator�Callable� Coroutine�Iterable)�Any�TypeVar�_Tc � � e Zd ZdZd d�Ze d
d�� Ze dd�� Ze dd�� Ze d
d�� Z edd�� Z
y)�
TestRunnerzr
Encapsulates a running event loop. Every call made through this object will use the
same event loop.
c � � | S �N� ��selfs �i/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/anyio/abc/_testing.py� __enter__zTestRunner.__enter__ s � ��� c � � y r r )r �exc_type�exc_val�exc_tbs r �__exit__zTestRunner.__exit__ s � � r c � � y)a
Run an async generator fixture.
:param fixture_func: the fixture function
:param kwargs: keyword arguments to call the fixture function with
:return: an iterator yielding the value yielded from the async generator
Nr �r �fixture_func�kwargss r �run_asyncgen_fixturezTestRunner.run_asyncgen_fixture � � r c � � y)z�
Run an async fixture.
:param fixture_func: the fixture function
:param kwargs: keyword arguments to call the fixture function with
:return: the return value of the fixture function
Nr r s r �run_fixturezTestRunner.run_fixture* r! r c � � y)z�
Run an async test function.
:param test_func: the test function
:param kwargs: keyword arguments to call the test function with
Nr )r � test_funcr s r �run_testzTestRunner.run_test8 r! r c � � y)z�
Check if the test runner is running.
:return: ``True`` if the coroutine is currently being run, ``False`` otherwise.
Nr r s r �
is_runningzTestRunner.is_runningC r! r N)�returnr )r ztype[BaseException] | Noner zBaseException | Noner ztypes.TracebackType | Noner) zbool | None)r z&Callable[..., AsyncGenerator[_T, Any]]r �dict[str, Any]r) zIterable[_T])r z&Callable[..., Coroutine[Any, Any, _T]]r r* r) r )r% z'Callable[..., Coroutine[Any, Any, Any]]r r* r) �None)r) �bool)�__name__�
__module__�__qualname__�__doc__r r r r r# r&