File: //home/arjun/.local/lib/python3.10/site-packages/anyio/abc/__pycache__/_testing.cpython-310.pyc
o
���g � @ sj d dl mZ d dlZd dlmZmZ d dlmZmZm Z m
Z
d dlmZm
Z
e
d�ZG dd� ded �ZdS )
� )�annotationsN)�ABCMeta�abstractmethod)�AsyncGenerator�Callable� Coroutine�Iterable)�Any�TypeVar�_Tc @ sR e Zd ZdZddd�Zed dd
��Zed!dd��Zed"dd��Zed#dd��Z dS )$�
TestRunnerzr
Encapsulates a running event loop. Every call made through this object will use the
same event loop.
�returnc C s | S �N� )�selfr r �E/home/arjun/.local/lib/python3.10/site-packages/anyio/abc/_testing.py� __enter__ s zTestRunner.__enter__�exc_type�type[BaseException] | None�exc_val�BaseException | None�exc_tb�types.TracebackType | None�bool | Nonec C s d S r r )r r r r r r r �__exit__ s zTestRunner.__exit__�fixture_func�&Callable[..., AsyncGenerator[_T, Any]]�kwargs�dict[str, Any]�Iterable[_T]c C � dS )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 r r r r r �run_asyncgen_fixture � zTestRunner.run_asyncgen_fixture�&Callable[..., Coroutine[Any, Any, _T]]r c C r )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! r r r �run_fixture* r# zTestRunner.run_fixture� test_func�'Callable[..., Coroutine[Any, Any, Any]]�Nonec C r )z�
Run an async test function.
:param test_func: the test function
:param kwargs: keyword arguments to call the test function with
Nr )r r&