ruạṛ
a �u:j � @ 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 @ sx e Zd ZdZd d�dd�Zeddddd �d d��Zedd dd�dd��Zedd dd�dd��Zedd dd�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/opt/bart/bart_venv/lib/python3.9/site-packages/anyio/abc/_testing.py� __enter__ s zTestRunner.__enter__ztype[BaseException] | NonezBaseException | Noneztypes.TracebackType | Nonezbool | None)�exc_type�exc_val�exc_tbr c C s d S r r )r r r r r r r �__exit__ s zTestRunner.__exit__z&Callable[..., AsyncGenerator[_T, Any]]zdict[str, Any]zIterable[_T])�fixture_func�kwargsr c C s 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 s zTestRunner.run_asyncgen_fixturez&Callable[..., Coroutine[Any, Any, _T]]r c C s dS )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* s zTestRunner.run_fixturez'Callable[..., Coroutine[Any, Any, Any]]�None)� test_funcr r c C s dS )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 r r r r �run_test8 s zTestRunner.run_testN) �__name__� __module__�__qualname__�__doc__r r r r r r r r r r r s r )� metaclass)� __future__r �types�abcr r �collections.abcr r r r �typingr r r r r r r r �<module> s
cải xoăn