o
    í6Wjò  ã                   @  sj   d dl mZ d dlZd dlmZmZ d dlmZmZm	Z	m
Z
 d dlmZmZ edƒZG dd„ ded	�ZdS )
é    )ÚannotationsN)ÚABCMetaÚabstractmethod)ÚAsyncGeneratorÚCallableÚ	CoroutineÚIterable)ÚAnyÚTypeVarÚ_Tc                   @  s`   e Zd ZdZd"dd„Zed#dd„ƒZed$dd„ƒZed%dd„ƒZed&dd„ƒZ	e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   úa/home/esfera/Documents/content_generation/venv/lib/python3.10/site-packages/anyio/abc/_testing.pyÚ	__enter__   s   zTestRunner.__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   zTestRunner.__exit__Úfixture_funcú&Callable[..., AsyncGenerator[_T, Any]]Úkwargsúdict[str, Any]úIterable[_T]c                 C  ó   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   ó    zTestRunner.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$   zTestRunner.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'   r   r   r   r   Úrun_test8   r$   zTestRunner.run_testÚboolc                 C  r!   )z�
        Check if the test runner is running.

        :return: ``True`` if the coroutine is currently being run, ``False`` otherwise.
        Nr   r   r   r   r   Ú
is_runningC   r$   zTestRunner.is_runningN)r   r   )r   r   r   r   r   r   r   r   )r   r   r   r   r   r    )r   r%   r   r   r   r   )r'   r(   r   r   r   r)   )r   r+   )Ú__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   r   r   Útypingr	   r
   r   r   r   r   r   r   Ú<module>   s    