U
    &%e                     @  sj   d dl mZ d dlZd dlmZmZ d dlmZmZ d dl	m
Z
mZmZmZ edZG dd ded	ZdS )
    )annotationsN)ABCMetaabstractmethod)AsyncGeneratorIterable)AnyCallable	CoroutineTypeVar_Tc                   @  s   e Zd ZdZd dddZddddd	d
dZeddddZeddddddZeddddddZ	eddddddZ
dS )
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   Q/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/anyio/abc/_testing.py	__enter__   s    zTestRunner.__enter__ztype[BaseException] | NonezBaseException | Noneztypes.TracebackType | Nonezbool | None)exc_typeexc_valexc_tbr   c                 C  s   |    d S r   )close)r   r   r   r   r   r   r   __exit__   s    zTestRunner.__exit__Nonec                 C  s   dS )zClose the event loop.Nr   r   r   r   r   r      s    zTestRunner.closez&Callable[..., AsyncGenerator[_T, Any]]zdict[str, Any]zIterable[_T])fixture_funckwargsr   c                 C  s   dS )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    zTestRunner.run_asyncgen_fixturez&Callable[..., Coroutine[Any, Any, _T]]r   c                 C  s   dS )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    zTestRunner.run_fixturez'Callable[..., Coroutine[Any, Any, Any]])	test_funcr   r   c                 C  s   dS )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_test=   s    zTestRunner.run_testN)__name__
__module____qualname____doc__r   r   r   r   r   r   r    r   r   r   r   r      s   	r   )	metaclass)
__future__r   typesabcr   r   collections.abcr   r   typingr   r   r	   r
   r   r   r   r   r   r   <module>   s   